From cb13589531cdeb1ca4df824a3eb805faba9b4fc6 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Tue, 10 Aug 2021 19:25:42 +0100 Subject: [PATCH] Fixed asma-test.sh --- etc/asma-test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/asma-test.sh b/etc/asma-test.sh index 8666738..e71ab4f 100755 --- a/etc/asma-test.sh +++ b/etc/asma-test.sh @@ -22,7 +22,8 @@ EOD expect_failure() { cat > 'in.tal' - if ../bin/uxncli asma.rom > asma.log 2>/dev/null || ! grep -qF "${1}" asma.log; then + ../bin/uxncli asma.rom > asma.log 2>/dev/null + if ! grep -qF "${1}" asma.log; then echo "error: asma didn't report error ${1} in faulty code" tail asma.log exit 1 @@ -44,7 +45,9 @@ find ../projects -type f -name '*.tal' -not -name 'blank.tal' | sort | while rea xxd "uxnasm-${BN}.rom" > "uxnasm-${BN}.hex" cp "${F}" 'in.tal' - if ! ../bin/uxncli asma.rom > asma.log; then + rm -f 'out.rom' + ../bin/uxncli asma.rom > asma.log + if [ ! -f 'out.rom' ]; then echo "error: asma failed to assemble ${F}, while uxnasm succeeded" tail asma.log exit 1