mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add some basic regression tests.
Most cause crashes. Only macro-@ works correctly; the others need to be fixed.
This commit is contained in:
2
test/asm/bank-noexist.asm
Normal file
2
test/asm/bank-noexist.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
SECTION "sec", ROM0
|
||||
db BANK(noexist)
|
||||
2
test/asm/bank-noexist.out
Normal file
2
test/asm/bank-noexist.out
Normal file
@@ -0,0 +1,2 @@
|
||||
ERROR: bank-noexist.asm(2) :
|
||||
'noexist' not defined
|
||||
1
test/asm/divzero-section-bank.asm
Normal file
1
test/asm/divzero-section-bank.asm
Normal file
@@ -0,0 +1 @@
|
||||
SECTION "sec", ROMX[$/0]
|
||||
3
test/asm/divzero-section-bank.out
Normal file
3
test/asm/divzero-section-bank.out
Normal file
@@ -0,0 +1,3 @@
|
||||
ERROR: foo.asm(1) :
|
||||
syntax error
|
||||
rgbasm: Assembly aborted in pass 1 (1 errors)!
|
||||
1
test/asm/macro-@.asm
Normal file
1
test/asm/macro-@.asm
Normal file
@@ -0,0 +1 @@
|
||||
foo @bar
|
||||
2
test/asm/macro-@.out
Normal file
2
test/asm/macro-@.out
Normal file
@@ -0,0 +1,2 @@
|
||||
ERROR: macro-@.asm(1) -> @(-1) :
|
||||
Macro '@' not defined
|
||||
BIN
test/asm/null-in-macro.asm
Normal file
BIN
test/asm/null-in-macro.asm
Normal file
Binary file not shown.
0
test/asm/null-in-macro.out
Normal file
0
test/asm/null-in-macro.out
Normal file
7
test/asm/test.sh
Normal file
7
test/asm/test.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
fname=$(mktemp)
|
||||
|
||||
for i in *.asm; do
|
||||
../../rgbasm $i >$fname 2>&1
|
||||
# diff -u $fname $(basename $i .asm).out
|
||||
diff -u $fname ${i%.asm}.out
|
||||
done
|
||||
3
test/asm/undefined-dot.asm
Normal file
3
test/asm/undefined-dot.asm
Normal file
@@ -0,0 +1,3 @@
|
||||
SECTION "sec", ROM0
|
||||
foo:
|
||||
add sp, .
|
||||
2
test/asm/undefined-dot.out
Normal file
2
test/asm/undefined-dot.out
Normal file
@@ -0,0 +1,2 @@
|
||||
ERROR: undefined-dot.asm(3) :
|
||||
'.' not defined
|
||||
Reference in New Issue
Block a user