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