t/passfailtest.do: just return exit codes, don't print messages.
The exit code numbers are useful enough, and the messages are the sort of thing that might turn into lies eventually.
This commit is contained in:
parent
b3a14a28c4
commit
0979a6e666
1 changed files with 6 additions and 21 deletions
|
|
@ -1,28 +1,13 @@
|
|||
rm -f pleasefail
|
||||
redo passfail
|
||||
if [ ! -e passfail ]; then
|
||||
echo "passfail should exist" >&2
|
||||
exit 42
|
||||
fi
|
||||
[ -e passfail ] || exit 42
|
||||
PF1=$(cat passfail)
|
||||
touch pleasefail
|
||||
if redo passfail 2>/dev/null; then
|
||||
echo "redo passfail should have failed" >&2
|
||||
exit 42
|
||||
fi
|
||||
if [ ! -e passfail ]; then
|
||||
echo "passfail should STILL exist" >&2
|
||||
exit 42
|
||||
fi
|
||||
redo passfail 2>/dev/null && exit 43
|
||||
[ -e passfail ] || exit 44
|
||||
PF2=$(cat passfail)
|
||||
if [ "$PF1" != "$PF2" ]; then
|
||||
echo "passfail changed even though it failed" >&2
|
||||
exit 42
|
||||
fi
|
||||
[ "$PF1" = "$PF2" ] || exit 45
|
||||
rm -f pleasefail
|
||||
redo passfail || exit 43
|
||||
redo passfail || exit 46
|
||||
PF3=$(cat passfail)
|
||||
if [ "$PF1" = "$PF3" ]; then
|
||||
echo "passfail did not change even though it passed" >&2
|
||||
exit 42
|
||||
fi
|
||||
[ "$PF1" != "$PF3" ] || exit 47
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue