commit cb13589531cdeb1ca4df824a3eb805faba9b4fc6 parent 76470ce3ee9efed229558ae223b5525a3e341382 Author: Andrew Alderwick <andrew@alderwick.co.uk> Date: Tue, 10 Aug 2021 19:25:42 +0100 Fixed asma-test.sh Diffstat:
M | etc/asma-test.sh | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git 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