1
0
Fork 0
mirror of synced 2024-06-30 12:41:09 -04:00
dotbot/test/tests/link-glob-multi-star.bash
E. Keys d6694f9653 link.py: globbing keep leading '.'
- Updated plugins/link.py so that globbing will not strip leading '.' when
    creating link names.
- Corrected test collection output in test/link-glob-multi-start

Fixes #244
2020-11-21 10:41:03 -05:00

32 lines
670 B
Bash

test_description='link glob multi star'
. '../test-lib.bash'
test_expect_success 'setup' '
mkdir ${DOTFILES}/config &&
mkdir ${DOTFILES}/config/foo &&
mkdir ${DOTFILES}/config/bar &&
echo "apple" > ${DOTFILES}/config/foo/a &&
echo "banana" > ${DOTFILES}/config/bar/b &&
echo "cherry" > ${DOTFILES}/config/bar/c
'
test_expect_success 'run' '
run_dotbot -v <<EOF
- defaults:
link:
glob: true
create: true
- link:
~/.config/: config/*/*
EOF
'
test_expect_success 'test' '
! readlink ~/.config/ &&
! readlink ~/.config/foo &&
readlink ~/.config/foo/a &&
grep "apple" ~/.config/foo/a &&
grep "banana" ~/.config/bar/b &&
grep "cherry" ~/.config/bar/c
'