summaryrefslogtreecommitdiff
path: root/test/tests/except-multi.bash
diff options
context:
space:
mode:
Diffstat (limited to 'test/tests/except-multi.bash')
-rw-r--r--test/tests/except-multi.bash21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/tests/except-multi.bash b/test/tests/except-multi.bash
new file mode 100644
index 0000000..4193e66
--- /dev/null
+++ b/test/tests/except-multi.bash
@@ -0,0 +1,21 @@
+test_description='--except with multiple arguments'
+. '../test-lib.bash'
+
+test_expect_success 'setup' '
+ln -s ${DOTFILES}/nonexistent ~/bad && touch ${DOTFILES}/y
+'
+
+test_expect_success 'run' '
+run_dotbot --except clean shell <<EOF
+- clean: ["~"]
+- shell:
+ - echo "x" > ~/x
+- link:
+ ~/y: y
+EOF
+'
+
+test_expect_success 'test' '
+[ "$(readlink ~/bad | cut -d/ -f4-)" = "dotfiles/nonexistent" ] &&
+ ! test -f ~/x && test -f ~/y
+'