mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Automatic tests for input from stdin
This commit is contained in:
0
test/asm/bank-noexist.out.pipe
Normal file
0
test/asm/bank-noexist.out.pipe
Normal file
2
test/asm/divzero-instr.out.pipe
Normal file
2
test/asm/divzero-instr.out.pipe
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ERROR: -(2):
|
||||||
|
Division by zero
|
||||||
4
test/asm/divzero-section-bank.out.pipe
Normal file
4
test/asm/divzero-section-bank.out.pipe
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ERROR: -(1):
|
||||||
|
Invalid integer constant
|
||||||
|
ERROR: -(1):
|
||||||
|
Division by zero
|
||||||
0
test/asm/equ-charmap.out.pipe
Normal file
0
test/asm/equ-charmap.out.pipe
Normal file
3
test/asm/label-redefinition.out.pipe
Normal file
3
test/asm/label-redefinition.out.pipe
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: -(7):
|
||||||
|
'Sym' already defined in m(6)
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
2
test/asm/line-continuation.out.pipe
Normal file
2
test/asm/line-continuation.out.pipe
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ERROR: -(2) -> @(-1):
|
||||||
|
Macro '@' not defined
|
||||||
3
test/asm/local-wrong-parent.out.pipe
Normal file
3
test/asm/local-wrong-parent.out.pipe
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: -(5):
|
||||||
|
Not currently in the scope of 'WrongParent'
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
2
test/asm/macro-@.out.pipe
Normal file
2
test/asm/macro-@.out.pipe
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ERROR: -(1) -> @(-1):
|
||||||
|
Macro '@' not defined
|
||||||
0
test/asm/narg-decreases-after-shift.out.pipe
Normal file
0
test/asm/narg-decreases-after-shift.out.pipe
Normal file
2
test/asm/null-in-macro.out.pipe
Normal file
2
test/asm/null-in-macro.out.pipe
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ERROR: -(1):
|
||||||
|
Unterminated MACRO definition.
|
||||||
3
test/asm/reference-undefined-sym.out.pipe
Normal file
3
test/asm/reference-undefined-sym.out.pipe
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: -(4):
|
||||||
|
'X' already referenced at -(2)
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
0
test/asm/remote-local-explicit.out.pipe
Normal file
0
test/asm/remote-local-explicit.out.pipe
Normal file
2
test/asm/remote-local-noexist.out.pipe
Normal file
2
test/asm/remote-local-noexist.out.pipe
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ERROR: -(7):
|
||||||
|
'Parent.child.fail' is a nonsensical reference to a nested local symbol
|
||||||
0
test/asm/remote-local.out.pipe
Normal file
0
test/asm/remote-local.out.pipe
Normal file
2
test/asm/strlen.out.pipe
Normal file
2
test/asm/strlen.out.pipe
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
$3
|
||||||
|
$4
|
||||||
31
test/asm/strsub.out.pipe
Normal file
31
test/asm/strsub.out.pipe
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
warning: -(13) -> xstrsub(1):
|
||||||
|
STRSUB: Length too big: 32
|
||||||
|
warning: -(14) -> xstrsub(1):
|
||||||
|
STRSUB: Length too big: 300
|
||||||
|
warning: -(15) -> xstrsub(1):
|
||||||
|
STRSUB: Position starts at 1
|
||||||
|
warning: -(15) -> xstrsub(1):
|
||||||
|
STRSUB: Length too big: 300
|
||||||
|
warning: -(16) -> xstrsub(1):
|
||||||
|
STRSUB: Position 4 is past the end of the string
|
||||||
|
warning: -(17) -> xstrsub(1):
|
||||||
|
STRSUB: Position 4 is past the end of the string
|
||||||
|
warning: -(17) -> xstrsub(1):
|
||||||
|
STRSUB: Length too big: 1
|
||||||
|
warning: -(20) -> xstrsub(1):
|
||||||
|
STRSUB: Length too big: 10
|
||||||
|
A
|
||||||
|
B
|
||||||
|
C
|
||||||
|
AB
|
||||||
|
BC
|
||||||
|
BC
|
||||||
|
BC
|
||||||
|
ABC
|
||||||
|
|
||||||
|
|
||||||
|
カタ
|
||||||
|
カナ
|
||||||
|
カナ
|
||||||
|
g
|
||||||
|
g̈
|
||||||
@@ -6,18 +6,25 @@ after=$(mktemp)
|
|||||||
rc=0
|
rc=0
|
||||||
|
|
||||||
for i in *.asm; do
|
for i in *.asm; do
|
||||||
../../rgbasm -o $o $i > $after 2>&1
|
for variant in '' '.pipe'; do
|
||||||
diff -u ${i%.asm}.out $after
|
if [ -z "$variant" ]; then
|
||||||
rc=$(($? || $rc))
|
../../rgbasm -o $o $i > $after 2>&1
|
||||||
bin=${i%.asm}.out.bin
|
else
|
||||||
if [ -f $bin ]; then
|
cat $i | ../../rgbasm -o $o - > $after 2>&1
|
||||||
../../rgblink -o $gb $o > $after 2>&1
|
fi
|
||||||
head -c $(wc -c < $bin) $gb > $after 2>&1
|
|
||||||
hexdump -C $after > $before && mv $before $after
|
diff -u ${i%.asm}.out$variant $after
|
||||||
hexdump -C $bin > $before
|
|
||||||
diff -u $before $after
|
|
||||||
rc=$(($? || $rc))
|
rc=$(($? || $rc))
|
||||||
fi
|
bin=${i%.asm}.out.bin
|
||||||
|
if [ -f $bin ]; then
|
||||||
|
../../rgblink -o $gb $o > $after 2>&1
|
||||||
|
head -c $(wc -c < $bin) $gb > $after 2>&1
|
||||||
|
hexdump -C $after > $before && mv $before $after
|
||||||
|
hexdump -C $bin > $before
|
||||||
|
diff -u $before $after
|
||||||
|
rc=$(($? || $rc))
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -f $o $gb $before $after
|
rm -f $o $gb $before $after
|
||||||
|
|||||||
1
test/asm/undefined-dot.out.pipe
Normal file
1
test/asm/undefined-dot.out.pipe
Normal file
@@ -0,0 +1 @@
|
|||||||
|
error: -(3) : '.' not defined
|
||||||
0
test/asm/utf-8.out.pipe
Normal file
0
test/asm/utf-8.out.pipe
Normal file
Reference in New Issue
Block a user