mirror of
https://github.com/fachat/xa65.git
synced 2025-01-01 10:29:19 +00:00
Allow .a65 files as test files
This commit is contained in:
parent
157ebf100a
commit
e1ca691f0a
5
xa/tests/chardelimiter/Makefile
Normal file
5
xa/tests/chardelimiter/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
tests:
|
||||||
|
./runtest.sh -q -C
|
||||||
|
|
||||||
|
|
32
xa/tests/chardelimiter/runtest.sh
Executable file
32
xa/tests/chardelimiter/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=""
|
||||||
|
|
||||||
|
# files to compare afterwards, against <file>-<script>
|
||||||
|
COMPAREFILES=a.out
|
||||||
|
|
||||||
|
XA=$THISDIR/../../xa
|
||||||
|
|
||||||
|
##########################
|
||||||
|
# actual code
|
||||||
|
. ../func.sh
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Assemble *.asm test files"
|
echo "Assemble *.asm or *.a65 test files"
|
||||||
echo " $0 [options] [frs_scripts]"
|
echo " $0 [options] [frs_scripts]"
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -v verbose log"
|
echo " -v verbose log"
|
||||||
@ -126,7 +126,8 @@ fi
|
|||||||
|
|
||||||
# scripts to run
|
# scripts to run
|
||||||
if [ "x$*" = "x" ]; then
|
if [ "x$*" = "x" ]; then
|
||||||
SCRIPTS=$THISDIR/*${FILTER}*.asm
|
shopt -s extglob
|
||||||
|
SCRIPTS=$THISDIR/*${FILTER}*.a[s6][m5]
|
||||||
SCRIPTS=`basename -a $SCRIPTS`;
|
SCRIPTS=`basename -a $SCRIPTS`;
|
||||||
|
|
||||||
TESTSCRIPTS=""
|
TESTSCRIPTS=""
|
||||||
@ -149,7 +150,11 @@ else
|
|||||||
if test -f "$i".asm ; then
|
if test -f "$i".asm ; then
|
||||||
TESTSCRIPTS="$TESTSCRIPTS $i.asm";
|
TESTSCRIPTS="$TESTSCRIPTS $i.asm";
|
||||||
else
|
else
|
||||||
TESTSCRIPTS="$TESTSCRIPTS $i";
|
if test -f "$i".a65 ; then
|
||||||
|
TESTSCRIPTS="$TESTSCRIPTS $i.a65";
|
||||||
|
else
|
||||||
|
TESTSCRIPTS="$TESTSCRIPTS $i";
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
fi;
|
fi;
|
||||||
@ -234,6 +239,9 @@ for script in $TESTSCRIPTS; do
|
|||||||
|
|
||||||
if test "x$COMPAREFILES" != "x"; then
|
if test "x$COMPAREFILES" != "x"; then
|
||||||
testname=`basename $script .asm`
|
testname=`basename $script .asm`
|
||||||
|
if [ "$script" = "$testname" ]; then
|
||||||
|
testname=`basename $script .a65`
|
||||||
|
fi
|
||||||
for i in $COMPAREFILES; do
|
for i in $COMPAREFILES; do
|
||||||
NAME="${THISDIR}/${i}-${testname}"
|
NAME="${THISDIR}/${i}-${testname}"
|
||||||
if test -f ${NAME}; then
|
if test -f ${NAME}; then
|
||||||
|
Loading…
Reference in New Issue
Block a user