mirror of
https://github.com/fachat/xa65.git
synced 2025-04-06 20:37:09 +00:00
More tests
This commit is contained in:
parent
282f48e1ea
commit
7453b3076d
5
xa/tests/fordef/Makefile
Normal file
5
xa/tests/fordef/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
tests:
|
||||
./runtest.sh -q -C
|
||||
|
||||
|
32
xa/tests/fordef/runtest.sh
Executable file
32
xa/tests/fordef/runtest.sh
Executable 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
|
||||
|
@ -16,5 +16,5 @@ t1 lda `forward1
|
||||
sta `forward2
|
||||
rts
|
||||
|
||||
#include "test2.asm"
|
||||
#include "test2.s"
|
||||
|
||||
|
4
xa/tests/fordef/test.asm.err-test
Normal file
4
xa/tests/fordef/test.asm.err-test
Normal 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
|
@ -18,4 +18,4 @@
|
||||
lda (forward1),y
|
||||
jmp forward3
|
||||
|
||||
#include "test2.asm"
|
||||
#include "test2.s"
|
||||
|
18
xa/tests/fordef/test4.asm
Normal file
18
xa/tests/fordef/test4.asm
Normal 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
xa/tests/fordef/test4.asm.err-test4
Normal file
7
xa/tests/fordef/test4.asm.err-test4
Normal 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
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user