1
0
Fork 0
mirror of synced 2024-11-04 16:28:56 -05:00
dotbot/test/tests/only.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

31 lines
467 B
Bash

test_description='--only'
. '../test-lib.bash'
test_expect_success 'setup' '
echo "apple" > ${DOTFILES}/x
'
test_expect_success 'run' '
run_dotbot --only shell <<EOF
- shell:
- echo "pear" > ~/y
- link:
~/x: x
EOF
'
test_expect_success 'test' '
grep "pear" ~/y && ! test -f ~/x
'
test_expect_success 'run 2' '
run_dotbot --only link <<EOF
- shell:
- echo "pear" > ~/z
- link:
~/x: x
'
test_expect_success 'test' '
grep "apple" ~/x && ! test -f ~/z
'