Enable RGBGFX's CLI "at-files" for all programs (#1848)

This commit is contained in:
Rangi
2025-10-22 17:05:59 -04:00
committed by GitHub
parent a0bb830679
commit f065243cd2
44 changed files with 1466 additions and 1334 deletions

View File

@@ -61,10 +61,9 @@ else
fi
for i in *.asm notexist.asm; do
flags=${i%.asm}.flags
RGBASMFLAGS="-Weverything -Bcollapse"
if [ -f "$flags" ]; then
RGBASMFLAGS="$RGBASMFLAGS $(head -n 1 "$flags")" # Allow other lines to serve as comments
if [ -f "${i%.asm}.flags" ]; then
RGBASMFLAGS="$RGBASMFLAGS @${i%.asm}.flags"
fi
for variant in '' ' piped'; do
(( tests++ ))
@@ -134,7 +133,6 @@ for i in *.asm notexist.asm; do
done
for i in cli/*.flags; do
RGBASMFLAGS="$(head -n 1 "$i")" # Allow other lines to serve as comments
(( tests++ ))
echo "${bold}${green}${i%.flags}...${rescolors}${resbold}"
if [ -e "${i%.flags}.out" ]; then
@@ -147,7 +145,7 @@ for i in cli/*.flags; do
else
desired_errput=/dev/null
fi
"$RGBASM" $RGBASMFLAGS >"$output" 2>"$errput"
"$RGBASM" "@$i" >"$output" 2>"$errput"
tryDiff "$desired_output" "$output" out
our_rc=$?

View File

@@ -1,2 +1,2 @@
-w -m mbc3+ram -r 0
The "-w" suppresses "-Wmbc" and "-Woverwrite" warnings
# The "-w" suppresses "-Wmbc" and "-Woverwrite" warnings

View File

@@ -1 +1 @@
-m '$2a'
-m $2a

View File

@@ -1 +1 @@
-i 'FOUR!'
-i FOUR!

View File

@@ -1,2 +1,2 @@
-Cf h
Checks that the header checksum properly accounts for header modifications
# Checks that the header checksum properly accounts for header modifications

View File

@@ -1,2 +1,2 @@
-Wno-overwrite -Cjv -t PM_CRYSTAL -i BYTE -n 0 -k 01 -l 0x33 -m 0x10 -r 3 -p 0
Checks that the -Wno-overwrite flag suppresses "Overwrote a non-zero byte" warnings from the rest
# Checks that the -Wno-overwrite flag suppresses "Overwrote a non-zero byte" warnings from the rest

View File

@@ -50,10 +50,14 @@ tryCmp () {
}
runTest () {
flags=$(
head -n 1 "$2/$1.flags" | # Allow other lines to serve as comments
sed "s# ./# ${src//#/\\#}/#g" # Prepend src directory to path arguments
)
if grep -qF ' ./' "$2/$1.flags"; then
flags=$(
head -n 1 "$2/$1.flags" | # Allow other lines to serve as comments
sed "s# ./# ${src//#/\\#}/#g" # Prepend src directory to path arguments
)
else
flags="@$2/$1.flags"
fi
for variant in '' ' piped' ' output'; do
(( tests++ ))

View File

@@ -1,3 +1,3 @@
-t 0123456789ABCDEF -C
Checks that the CGB flag correctly truncates the title to 15 chars only,
even when it's specified *after* the title..!
# Checks that the CGB flag correctly truncates the title to 15 chars only,
# even when it's specified *after* the title..!

View File

@@ -1,2 +1,2 @@
-C -t 0123456789ABCDEF
Checks that the CGB flag correctly truncates the title to 15 chars only
# Checks that the CGB flag correctly truncates the title to 15 chars only

View File

@@ -1,3 +1,3 @@
-t 0123456789ABCDEF -c
Checks that the CGB compat flag correctly truncates the title to 15 chars only,
even when it's specified *after* the title..!
# Checks that the CGB compat flag correctly truncates the title to 15 chars only,
# even when it's specified *after* the title..!

View File

@@ -1,2 +1,2 @@
-c -t 0123456789ABCDEF
Checks that the CGB compat flag correctly truncates the title to 15 chars only
# Checks that the CGB compat flag correctly truncates the title to 15 chars only

View File

@@ -1,3 +1,3 @@
-t 0123456789ABCDEF -i rgbd
Checks that the game ID flag correctly truncates the title to 11 chars only,
even when it's specified *after* the title..!
# Checks that the game ID flag correctly truncates the title to 11 chars only,
# even when it's specified *after* the title..!

View File

@@ -1,2 +1,2 @@
-i rgbd -t 0123456789ABCDEF
Checks that the game ID flag correctly truncates the title to 11 chars only
# Checks that the game ID flag correctly truncates the title to 11 chars only

View File

@@ -1 +1 @@
-t "I LOVE YOU"
-t I_LOVE_YOU

Binary file not shown.

View File

@@ -1 +1 @@
-t "Game Boy dev rox"
-t Game_Boy_dev_rox

Binary file not shown.

View File

@@ -1,2 +1 @@
-m MBC1337

View File

@@ -1,4 +1,4 @@
-vp 69
Check that the global checksum is correctly affected by padding:
Padding adds extra bytes (carefully picked *not* to be 0, or other values),
which must be properly accounted for.
# Check that the global checksum is correctly affected by padding:
# Padding adds extra bytes (carefully picked *not* to be 0, or other values),
# which must be properly accounted for.

View File

@@ -1,2 +1,2 @@
-f LHG
Checks that the global checksum is correctly affected by the header checksum
# Checks that the global checksum is correctly affected by the header checksum

View File

@@ -1,2 +1,2 @@
-v
Checks that the global checksum is correctly affected by the header checksum
# Checks that the global checksum is correctly affected by the header checksum