1
0
Fork 0
mirror of synced 2024-11-22 08:15:34 -05:00
dotbot/test/tests/only-multi.bash
Anish Athalye 7ffaa65482 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.
2020-03-26 11:23:07 -04:00

20 lines
377 B
Bash

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
'