better test case for exit-on-failure
This commit is contained in:
parent
4d2e1537f4
commit
aaf5037725
|
@ -2,18 +2,31 @@ test_description='test exit on failure'
|
||||||
. '../test-lib.bash'
|
. '../test-lib.bash'
|
||||||
|
|
||||||
test_expect_success 'setup' '
|
test_expect_success 'setup' '
|
||||||
echo "apple" > ${DOTFILES}/f
|
echo "apple" > ${DOTFILES}/f1 &&
|
||||||
|
echo "orange" > ${DOTFILES}/f2 &&
|
||||||
|
echo "pineapple" > ${DOTFILES}/f3
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_failure 'run' '
|
test_expect_failure 'run_case1' '
|
||||||
run_dotbot -x <<EOF
|
run_dotbot -x <<EOF
|
||||||
- shell:
|
- shell:
|
||||||
- "this_is_not_a_command"
|
- "this_is_not_a_command"
|
||||||
- link:
|
- link:
|
||||||
~/f:
|
~/f1:
|
||||||
|
EOF
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_failure 'run_case2' '
|
||||||
|
run_dotbot -x <<EOF
|
||||||
|
- link:
|
||||||
|
~/f2:
|
||||||
|
- shell:
|
||||||
|
- "this_is_not_a_command"
|
||||||
|
- link:
|
||||||
|
~/f3:
|
||||||
EOF
|
EOF
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'test' '
|
test_expect_success 'test' '
|
||||||
[[ ! -f ~/f ]]
|
[[ ! -f ~/f1 ]] && [[ -f ~/f2 ]] && [[ ! -f ~/f3 ]]
|
||||||
'
|
'
|
||||||
|
|
Loading…
Reference in a new issue