From 8d08e4b1adfd00092835b6aed0edecd222f49977 Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Fri, 6 Apr 2018 22:09:57 +0530 Subject: 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 (limited to 'test') 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 < Date: Fri, 6 Apr 2018 22:37:52 +0530 Subject: Fix tests on Travis CI The tests were failing due to the '~/bin' directory already existing on the machine. This patch changes the tests to use the directory name 'foo'. --- test/tests/link-glob-ambiguous.bash | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/tests/link-glob-ambiguous.bash b/test/tests/link-glob-ambiguous.bash index 97d42cd..7e23348 100644 --- a/test/tests/link-glob-ambiguous.bash +++ b/test/tests/link-glob-ambiguous.bash @@ -2,44 +2,44 @@ test_description='link glob ambiguous' . '../test-lib.bash' test_expect_success 'setup' ' -mkdir ${DOTFILES}/bin +mkdir ${DOTFILES}/foo ' test_expect_failure 'run 1' ' run_dotbot <