1
0
Fork 0
mirror of synced 2024-11-08 10:08:57 -05:00
dotbot/test/tests/exit-on-failure.bash

33 lines
533 B
Bash
Raw Normal View History

2021-09-12 20:32:25 -04:00
test_description='test exit on failure'
. '../test-lib.bash'
test_expect_success 'setup' '
2021-09-12 20:40:37 -04:00
echo "apple" > ${DOTFILES}/f1 &&
echo "orange" > ${DOTFILES}/f2 &&
echo "pineapple" > ${DOTFILES}/f3
2021-09-12 20:32:25 -04:00
'
2021-09-12 20:40:37 -04:00
test_expect_failure 'run_case1' '
2021-09-12 20:32:25 -04:00
run_dotbot -x <<EOF
- shell:
- "this_is_not_a_command"
- link:
2021-09-12 20:40:37 -04:00
~/f1:
EOF
'
test_expect_failure 'run_case2' '
run_dotbot -x <<EOF
- link:
~/f2:
- shell:
- "this_is_not_a_command"
- link:
~/f3:
2021-09-12 20:32:25 -04:00
EOF
'
test_expect_success 'test' '
2021-09-12 20:40:37 -04:00
[[ ! -f ~/f1 ]] && [[ -f ~/f2 ]] && [[ ! -f ~/f3 ]]
2021-09-12 20:32:25 -04:00
'