2020-03-25 21:38:39 -04:00
|
|
|
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
|
2021-02-25 08:16:27 -05:00
|
|
|
EOF
|
2020-03-25 21:38:39 -04:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success 'test' '
|
|
|
|
grep "apple" ~/x && ! test -f ~/z
|
|
|
|
'
|