diff options
Diffstat (limited to 'test/tests/link-glob-multi-star.bash')
-rw-r--r-- | test/tests/link-glob-multi-star.bash | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/tests/link-glob-multi-star.bash b/test/tests/link-glob-multi-star.bash new file mode 100644 index 0000000..11ae740 --- /dev/null +++ b/test/tests/link-glob-multi-star.bash @@ -0,0 +1,31 @@ +test_description='link glob' +. '../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 +' |