Add CLI tests for RGBASM

This commit is contained in:
Rangi42
2025-09-23 15:51:05 -04:00
committed by Rangi
parent 09ef5b7e06
commit 0670c03bc2
38 changed files with 180 additions and 51 deletions

View File

@@ -88,9 +88,17 @@ doesn't fit the existing scheme(s).
### RGBASM
There are two kinds of test.
#### Simple tests
Each `.asm` file corresponds to one test.
RGBASM will be invoked on the `.asm` file with all warnings enabled.
If a `.flags` file exists, its first line contains flags to pass to RGBASM.
(There may be more lines, which will be ignored; they can serve as comments to
explain what the test is about.)
If a `.out` file exists, RGBASM's output (`print`, `println`, etc.) must match
its contents.
If a `.err` file exists, RGBASM's error output (`warn`, errors, etc.) must match
@@ -100,6 +108,18 @@ If a `.out.bin` file exists, the object file will be linked, and the generated
ROM truncated to the length of the `.out.bin` file.
After that, the ROM must match the `.out.bin` file.
#### CLI tests
Each `.flags` file in `cli/` corresponds to one test.
RGBASM will be invoked, passing it the first line of the `.flags` file.
(There may be more lines, which will be ignored; they can serve as comments to
explain what the test is about.)
If a `.out` file exists, RGBASM's output (`print`, `println`, etc.) must match
its contents.
If a `.err` file exists, RGBASM's error output (`warn`, errors, etc.) must match
its contents.
### RGBLINK
Each `.asm` file corresponds to one test, or one *set* of tests.