From 0bf2dbd2698e73f53e04ebb92977a38e20c8c6d1 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 18 May 2016 14:26:44 +1200 Subject: Correct behaviour in test.sh --- test/test.sh | 13 ++++++++++--- 1 file 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) -- cgit v1.1