Add some basic regression tests.

Most cause crashes. Only macro-@ works correctly; the others need to
be fixed.
This commit is contained in:
Anthony J. Bentley
2015-01-27 04:33:38 -07:00
parent 361f1ac50b
commit d9f5ce339a
11 changed files with 23 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
SECTION "sec", ROM0
db BANK(noexist)
+2
View File
@@ -0,0 +1,2 @@
ERROR: bank-noexist.asm(2) :
'noexist' not defined
+1
View File
@@ -0,0 +1 @@
SECTION "sec", ROMX[$/0]
+3
View File
@@ -0,0 +1,3 @@
ERROR: foo.asm(1) :
syntax error
rgbasm: Assembly aborted in pass 1 (1 errors)!
+1
View File
@@ -0,0 +1 @@
foo @bar
+2
View File
@@ -0,0 +1,2 @@
ERROR: macro-@.asm(1) -> @(-1) :
Macro '@' not defined
Binary file not shown.
View File
+7
View 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
View File
@@ -0,0 +1,3 @@
SECTION "sec", ROM0
foo:
add sp, .
+2
View File
@@ -0,0 +1,2 @@
ERROR: undefined-dot.asm(3) :
'.' not defined