diff options
Diffstat (limited to 'test/tests/link-glob.bash')
-rw-r--r-- | test/tests/link-glob.bash | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/tests/link-glob.bash b/test/tests/link-glob.bash new file mode 100644 index 0000000..f1c813d --- /dev/null +++ b/test/tests/link-glob.bash @@ -0,0 +1,47 @@ +test_description='link glob' +. '../test-lib.bash' + +test_expect_success 'setup 1' ' +mkdir ${DOTFILES}/bin && +echo "apple" > ${DOTFILES}/bin/a && +echo "banana" > ${DOTFILES}/bin/b && +echo "cherry" > ${DOTFILES}/bin/c +' + +test_expect_success 'run 1' ' +run_dotbot -v <<EOF +- defaults: + link: + glob: true + create: true +- link: + ~/bin: bin/* +EOF +' + +test_expect_success 'test 1' ' +grep "apple" ~/bin/a && +grep "banana" ~/bin/b && +grep "cherry" ~/bin/c +' + +test_expect_success 'setup 2' ' +rm -rf ~/bin +' + +test_expect_success 'run 2' ' +run_dotbot -v <<EOF +- defaults: + link: + glob: true + create: true +- link: + ~/bin/: bin/* +EOF +' + +test_expect_success 'test 2' ' +grep "apple" ~/bin/a && +grep "banana" ~/bin/b && +grep "cherry" ~/bin/c +' |