summaryrefslogtreecommitdiff
path: root/vis/test.sh
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2017-04-06 10:04:13 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-04-06 10:05:08 +0200
commit2f76adc3cb674aeef60e2b0bc56b67b1ad9330cb (patch)
tree8e4d41d25ff61de17aadc28cb7a82c2b45e167c0 /vis/test.sh
parent9e0e157c7f3e01a34fb9b23237703cc9b0b133d8 (diff)
test: fail test with error on bad return code
Close #10
Diffstat (limited to 'vis/test.sh')
-rwxr-xr-xvis/test.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/vis/test.sh b/vis/test.sh
index 4dbcb12..91e3914 100755
--- a/vis/test.sh
+++ b/vis/test.sh
@@ -26,9 +26,10 @@ for t in $test_files; do
t=${t%.in}
t=${t#./}
$VIS "$t".in < /dev/null 2> /dev/null
+ RETURN_CODE=$?
printf "%-50s" "$t"
- if [ -e "$t".out ]; then
+ if [ $RETURN_CODE -eq 0 -a -e "$t".out ]; then
if cmp -s "$t".ref "$t".out 2> /dev/null; then
printf "PASS\n"
TESTS_OK=$((TESTS_OK + 1))