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

@@ -0,0 +1 @@
FATAL: Dependency files can only be created if a target file is specified with either '-o', '-MQ' or '-MT'

View File

@@ -0,0 +1 @@
-M depfile inputfile

View File

@@ -0,0 +1 @@
FATAL: Invalid argument for option '-B'

View File

@@ -0,0 +1 @@
-B nan

View File

@@ -0,0 +1 @@
FATAL: Invalid argument for option '-Q'

View File

@@ -0,0 +1 @@
-Q invalid

View File

@@ -0,0 +1 @@
FATAL: Invalid argument for option '-X'

View File

@@ -0,0 +1 @@
-X 0c777

View File

@@ -0,0 +1 @@
FATAL: Must specify exactly 2 characters for option '-b'

View File

@@ -0,0 +1 @@
-b 01X

View File

@@ -0,0 +1 @@
FATAL: Invalid argument for option '--color'

View File

@@ -0,0 +1 @@
--color yes

View File

@@ -0,0 +1 @@
FATAL: Must specify exactly 4 characters for option '-g'

View File

@@ -0,0 +1 @@
-g 0123X

View File

@@ -0,0 +1 @@
FATAL: Invalid argument for option '-p'

View File

@@ -0,0 +1 @@
-p 123abc

View File

@@ -0,0 +1 @@
FATAL: Invalid argument for option '-r'

View File

@@ -0,0 +1 @@
-r nan

View File

@@ -0,0 +1 @@
FATAL: Invalid argument for option '-s'

View File

@@ -0,0 +1 @@
-s invalid

View File

@@ -0,0 +1,17 @@
FATAL: More than one input file specified
Usage: rgbasm [-EhVvw] [-B depth] [-b chars] [-D name[=value]] [-g chars]
[-I path] [-M depend_file] [-MC] [-MG] [-MP] [-MT target_file]
[-MQ target_file] [-o out_file] [-P include_file] [-p pad_value]
[-Q precision] [-r depth] [-s features:state_file] [-W warning]
[-X max_errors] <file>
Useful options:
-E, --export-all export all labels
-M, --dependfile <path> set the output dependency file
-o, --output <path> set the output object file
-p, --pad-value <value> set the value to use for `DS`
-s, --state <features>:<path> set an output state file
-V, --version print RGBASM version and exit
-W, --warning <warning> enable or disable warnings
For more help, use "man rgbasm" or go to https://rgbds.gbdev.io/docs/

View File

@@ -0,0 +1 @@
one two

View File

@@ -0,0 +1 @@
FATAL: Argument for option '-Q' must be between 1 and 31

View File

@@ -0,0 +1 @@
-Q .999

View File

@@ -0,0 +1 @@
FATAL: Argument for option '-p' must be between 0 and 0xFF

View File

@@ -0,0 +1 @@
-p 999

View File

@@ -0,0 +1 @@
FATAL: Argument for option '-r' is out of range

View File

@@ -0,0 +1 @@
-r 0x10000000000000000

View File

@@ -0,0 +1,20 @@
warning: Overriding dependency file "one"
warning: Overriding output file "one"
warning: Overriding state file "only"
FATAL: No input file specified (pass "-" to read from standard input)
Usage: rgbasm [-EhVvw] [-B depth] [-b chars] [-D name[=value]] [-g chars]
[-I path] [-M depend_file] [-MC] [-MG] [-MP] [-MT target_file]
[-MQ target_file] [-o out_file] [-P include_file] [-p pad_value]
[-Q precision] [-r depth] [-s features:state_file] [-W warning]
[-X max_errors] <file>
Useful options:
-E, --export-all export all labels
-M, --dependfile <path> set the output dependency file
-o, --output <path> set the output object file
-p, --pad-value <value> set the value to use for `DS`
-s, --state <features>:<path> set an output state file
-V, --version print RGBASM version and exit
-W, --warning <warning> enable or disable warnings
For more help, use "man rgbasm" or go to https://rgbds.gbdev.io/docs/

View File

@@ -0,0 +1 @@
-M one -M two -o one -o two -s equ:only -s var:only