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