From 7ffaa65482a59fa485e7a8f19fe07a33694fc157 Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Wed, 25 Mar 2020 21:38:39 -0400 Subject: Add --only and --except command-line arguments Internal to Dotbot, we use the name "skip" instead of "except", because the latter is a keyword, and using a name like "except_" didn't seem as nice. --- test/tests/only.bash | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/tests/only.bash (limited to 'test/tests/only.bash') diff --git a/test/tests/only.bash b/test/tests/only.bash new file mode 100644 index 0000000..5222881 --- /dev/null +++ b/test/tests/only.bash @@ -0,0 +1,31 @@ +test_description='--only' +. '../test-lib.bash' + +test_expect_success 'setup' ' +echo "apple" > ${DOTFILES}/x +' + +test_expect_success 'run' ' +run_dotbot --only shell < ~/y +- link: + ~/x: x +EOF +' + +test_expect_success 'test' ' +grep "pear" ~/y && ! test -f ~/x +' + +test_expect_success 'run 2' ' +run_dotbot --only link < ~/z +- link: + ~/x: x +' + +test_expect_success 'test' ' +grep "apple" ~/x && ! test -f ~/z +' -- cgit v1.2.3