aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-05-18 14:26:44 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-05-18 14:26:44 +1200
commit0bf2dbd2698e73f53e04ebb92977a38e20c8c6d1 (patch)
tree886fcd2a951f422be2f5f4554446add501f5ec1e
parent00700a9693d779b9682e85b625114b1c21e95250 (diff)
downloadpgm-interlace-0bf2dbd2698e73f53e04ebb92977a38e20c8c6d1.tar.xz
Correct behaviour in test.sh
-rwxr-xr-xtest/test.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/test.sh b/test/test.sh
index d916a5b..6770d02 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -34,11 +34,18 @@ for i in {pass,error,xfail}/*.sh ; do
./$(basename $i) 2> "$log"
result=$?
if [ -f "$expected" ] ; then
- diff "$expected" "$out"
- result=$?
+ if ! diff "$expected" "$out" ; then
+ fail "output file doesn't match expectation"
+ popd > /dev/null
+ continue
+ fi
fi
if [ -f "$log_expected" ] ; then
- diff "$log_expected" "$log" || fail stderr doesn\'t match
+ if ! diff "$log_expected" "$log" ; then
+ fail "stderr doesn't match expectation"
+ popd > /dev/null
+ continue
+ fi
fi
case $test_type in
pass)