From b470088f1c0ffb7b948e7bf02d82133fe480516a Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sat, 25 Jan 2014 23:39:27 -0500 Subject: [PATCH] Return error for test files without any validation condition --- tests/opcodes.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/opcodes.sh b/tests/opcodes.sh index 3ae17fd..57ff3db 100755 --- a/tests/opcodes.sh +++ b/tests/opcodes.sh @@ -17,8 +17,12 @@ if test $? -ne 0 ; then return 1 fi +test_output_found=0 + while read line; do if echo ${line} | grep -q "; Test output"; then + test_output_found=1 + test_str=$(echo ${line} | sed "s/^; Test output: //") if ! grep -q "${test_str}" ${lf}; then @@ -28,4 +32,9 @@ while read line; do fi done < ${name}.asm +if [ x"${test_output_found}" == x0 ]; then + # Need at least one test output condition to verify correct operation + exit 1 +fi + exit 0 -- 2.20.1