From 8c04734d052fcea040de269457051539a57bab18 Mon Sep 17 00:00:00 2001
From: David Phillips <dbphillipsnz@gmail.com>
Date: Mon, 16 May 2016 21:19:18 +1200
Subject: Use result from program under test if no pgm output exists

---
 test/test.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/test.sh b/test/test.sh
index 6d51639..4c15e34 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -29,8 +29,11 @@ for i in {pass,error,xfail}/*.sh ; do
 	expected="$name.pgm.expected"
 	out="$name.pgm.out"
 	./$(basename $i) 2> $name.stderr.log
-	[ -f $expected ] && diff $expected $out
 	result=$?
+	if [ -f $expected ] ; then
+		diff $expected $out
+		result=$?
+	fi
 	case $test_type in
 		pass)
 			if [ $result -eq 0 ] ; then
-- 
cgit v1.1