mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Increase RGBASM test coverage
This commit is contained in:
10
test/link/pipeline/a.asm
Normal file
10
test/link/pipeline/a.asm
Normal file
@@ -0,0 +1,10 @@
|
||||
section "test", rom0
|
||||
db 1, 4, 9, 16
|
||||
|
||||
section "entrypoint", rom0[$100]
|
||||
ld b, b
|
||||
jp Start
|
||||
|
||||
section "start", rom0[$150]
|
||||
Start::
|
||||
jp Start
|
||||
BIN
test/link/pipeline/out.gb
Normal file
BIN
test/link/pipeline/out.gb
Normal file
Binary file not shown.
@@ -26,6 +26,7 @@ rescolors="$(tput op)"
|
||||
|
||||
RGBASM=../../rgbasm
|
||||
RGBLINK=../../rgblink
|
||||
RGBFIX=../../rgbfix
|
||||
|
||||
startTest () {
|
||||
echo "${bold}${green}${test} assembling...${rescolors}${resbold}"
|
||||
@@ -71,7 +72,7 @@ tryCmpRomSize () {
|
||||
}
|
||||
|
||||
rgblinkQuiet () {
|
||||
out="$(env $RGBLINK -Weverything -B collapse "$@")" || return $?
|
||||
out="$(env "$RGBLINK" -Weverything -B collapse "$@")" || return $?
|
||||
if [[ -n "$out" ]]; then
|
||||
echo "$bold${red}Linking shouldn't produce anything on stdout!${rescolors}${resbold}"
|
||||
false
|
||||
@@ -251,6 +252,16 @@ tryDiff "$test"/out.err "$outtemp"
|
||||
tryCmp "$test"/out.gb "$gbtemp"
|
||||
evaluateTest
|
||||
|
||||
test="pipeline"
|
||||
startTest
|
||||
continueTest
|
||||
("$RGBASM" -Weverything -B collapse -o - - | \
|
||||
"$RGBLINK" -Weverything -B collapse -o - - | \
|
||||
"$RGBFIX" -Weverything -v -p 0xff -) < "$test"/a.asm > "$gbtemp"
|
||||
# This test does not trim its output with 'dd' because it needs to verify the correct output size
|
||||
tryCmp "$test"/out.gb "$gbtemp"
|
||||
evaluateTest
|
||||
|
||||
test="same-consts"
|
||||
startTest
|
||||
"$RGBASM" -o "$otemp" "$test"/a.asm
|
||||
|
||||
Reference in New Issue
Block a user