1
0
mirror of https://github.com/fachat/xa65.git synced 2026-04-21 01:16:43 +00:00

More tests

This commit is contained in:
A. Fachat
2014-08-20 13:02:57 +02:00
parent 282f48e1ea
commit 7453b3076d
9 changed files with 70 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
tests:
./runtest.sh -q -C
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
# run a test script
#THISDIR=`dirname $0`
THISDIR=`pwd`
#echo "0=$0"
#echo "THISDIR=$THISDIR"
declare -A opts
#opts=([816.asm]="-w")
#opts[02.asm]="-C"
#ASMFLAGS=-v
ASMFLAGS=
# exclude filter from *.asm if no explicit file is given
EXCLUDE=
# test files used
TESTFILES="test2.s"
# files to compare afterwards, against <file>-<script>
COMPAREFILES="a.out test.asm.err test4.asm.err"
XA=$THISDIR/../../xa
##########################
# actual code
. ../func.sh
+1 -1
View File
@@ -16,5 +16,5 @@ t1 lda `forward1
sta `forward2
rts
#include "test2.asm"
#include "test2.s"
+4
View File
@@ -0,0 +1,4 @@
Copyright (C) 1989-2009 Andre Fachat, Jolse Maginnis, David Weinehall
and Cameron Kaiser.
test.asm:line 6: 0400: Warning - Can't optimize forward-defined label; using absolute addressing
test.asm:line 7: 0403: Warning - Can't optimize forward-defined label; using absolute addressing
+1 -1
View File
@@ -18,4 +18,4 @@
lda (forward1),y
jmp forward3
#include "test2.asm"
#include "test2.s"
+18
View File
@@ -0,0 +1,18 @@
.word $0400
*=$0400
/* define this if you want to crash and burn */
jmp `forward3
bne `forward3
lda (`forward1),y
lda (`forward3),y
sta `forward3
/* this looks like it should fail, but won't because there is no ambiguity */
lda (forward1),y
jmp forward3
#include "test2.s"
+7
View File
@@ -0,0 +1,7 @@
Copyright (C) 1989-2009 Andre Fachat, Jolse Maginnis, David Weinehall
and Cameron Kaiser.
test4.asm:line 6: 0400:Wrong addressing mode error
test4.asm:line 7: 0402:Wrong addressing mode error
test4.asm:line 8: 0401:Wrong addressing mode error
test4.asm:line 9: 0400:Wrong addressing mode error
test4.asm:line 9: 0409:Overflow error
+2
View File
@@ -202,6 +202,7 @@ for script in $TESTSCRIPTS; do
else
ALOG="-P $LOGFILE"
fi
ALOG="$ALOG -e $script.err"
# overwrite test files in each iteration, just in case
for i in $TESTFILES; do
@@ -275,6 +276,7 @@ if test $CLEAN -ge 2; then
for script in $TESTSCRIPTS; do
rm -f $TMPDIR/$script.log
rm -f $TMPDIR/$script.err
done;
# gzipped test files are unzipped