Fixed asma-test.sh

This commit is contained in:
Andrew Alderwick 2021-08-10 19:25:42 +01:00
parent 76470ce3ee
commit cb13589531
1 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,8 @@ EOD
expect_failure() { expect_failure() {
cat > 'in.tal' 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" echo "error: asma didn't report error ${1} in faulty code"
tail asma.log tail asma.log
exit 1 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" xxd "uxnasm-${BN}.rom" > "uxnasm-${BN}.hex"
cp "${F}" 'in.tal' 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" echo "error: asma failed to assemble ${F}, while uxnasm succeeded"
tail asma.log tail asma.log
exit 1 exit 1