Improve RGBASM test coverage

This commit is contained in:
Rangi42
2025-07-20 13:11:42 -04:00
parent 2dc948fefb
commit 9e0e7ef9a1
15 changed files with 30 additions and 37 deletions

View File

@@ -32,3 +32,4 @@ char '?', $3f ; ASCII
char 'F', 0
char 'ABF', 0
char '\n\r\t', 0
assert 0 == '

View File

@@ -12,4 +12,8 @@ warning: character-literals.asm(34) -> character-literals.asm::char(13): [-Wunma
Unmapped character '\t'
error: character-literals.asm(34) -> character-literals.asm::char(13):
Character literals must be a single charmap unit
Assembly aborted with 3 errors!
error: character-literals.asm(35):
Unterminated character
error: character-literals.asm(35):
Character literals must be a single charmap unit
Assembly aborted with 5 errors!

View File

@@ -0,0 +1 @@
println x

View File

@@ -0,0 +1,3 @@
error: include-slash.asm(0):
Error reading pre-included file 'include-slash-nonexist.inc': No such file or directory
Assembly aborted with 1 error!

View File

@@ -0,0 +1 @@
-Weverything -P include-slash.inc -I include -P include-slash-nonexist.inc

View File

@@ -0,0 +1 @@
$2A

View File

@@ -0,0 +1 @@
def x = 42

View File

@@ -12,7 +12,7 @@ def variable += 1
def con2 equ -1
def var2 = variable**2
def str2 equs strcat("{string}", "\0\n\t\r")
def str2 equs strcat("{string}", "\0\n\t\r\\\"\{")
charmap "c2", 10, -11, 987654321
PURGE polo

View File

@@ -10,7 +10,7 @@ def var2 = $9
; String constants
def string equs "goodbye~"
def str2 equs "hello!\0\n\t\r"
def str2 equs "hello!\0\n\t\r\\\"\{"
; Character maps
newcharmap main

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
fname=$(mktemp)
for i in *.asm; do
../../rgbasm $i >$fname 2>&1
mv -f $fname ${i%.asm}.out
done
rm -f $fname
exit 0