From 8d08e4b1adfd00092835b6aed0edecd222f49977 Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Fri, 6 Apr 2018 22:09:57 +0530 Subject: [PATCH] Add tests for globbing --- test/tests/link-glob-ambiguous.bash | 45 ++++++++++++++++++++++++++ test/tests/link-glob-multi-star.bash | 31 ++++++++++++++++++ test/tests/link-glob.bash | 47 ++++++++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 test/tests/link-glob-ambiguous.bash create mode 100644 test/tests/link-glob-multi-star.bash create mode 100644 test/tests/link-glob.bash diff --git a/test/tests/link-glob-ambiguous.bash b/test/tests/link-glob-ambiguous.bash new file mode 100644 index 0000000..97d42cd --- /dev/null +++ b/test/tests/link-glob-ambiguous.bash @@ -0,0 +1,45 @@ +test_description='link glob ambiguous' +. '../test-lib.bash' + +test_expect_success 'setup' ' +mkdir ${DOTFILES}/bin +' + +test_expect_failure 'run 1' ' +run_dotbot < ${DOTFILES}/config/foo/a && +echo "banana" > ${DOTFILES}/config/bar/b && +echo "cherry" > ${DOTFILES}/config/bar/c +' + +test_expect_success 'run' ' +run_dotbot -v < ${DOTFILES}/bin/a && +echo "banana" > ${DOTFILES}/bin/b && +echo "cherry" > ${DOTFILES}/bin/c +' + +test_expect_success 'run 1' ' +run_dotbot -v <