Add LOAD FRAGMENT pc test (#800)

Reproduces a reported problem, fix pending
This commit is contained in:
Eldred Habert
2021-03-28 21:11:20 +02:00
committed by GitHub
parent 57d966d6e0
commit 7461170956
5 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
SECTION "main", ROM0
LOAD FRAGMENT "test", SRAM
db 0
ENDL

View File

@@ -0,0 +1,7 @@
SECTION "SECTION2", ROM0
LOAD FRAGMENT "test", SRAM
jr Label
Label:
dw Label
ENDL

View File

Binary file not shown.

View File

@@ -130,13 +130,24 @@ rgblinkQuiet -o $gbtemp2 $otemp
tryCmp $gbtemp $gbtemp2
rc=$(($? || $rc))
i="load-fragment.asm"
startTest
$RGBASM -o $otemp load-fragment/a.asm
$RGBASM -o $gbtemp2 load-fragment/b.asm
rgblinkQuiet -o $gbtemp $otemp $gbtemp2 2>$outtemp
tryDiff load-fragment/out.err $outtemp
rc=$(($? || $rc))
dd if=$gbtemp count=1 bs=$(printf %s $(wc -c < load-fragment/out.gb)) > $otemp 2>/dev/null
tryCmp load-fragment/out.gb $otemp
rc=$(($? || $rc))
i="overlay.asm"
startTest
$RGBASM -o $otemp overlay/a.asm
rgblinkQuiet -o $gbtemp -t -O overlay/overlay.gb $otemp > $outtemp 2>&1
# This test does not trim its output with 'dd' because it needs to verify the correct output size
tryDiff overlay/out.err $outtemp
rc=$(($? || $rc))
# This test does not trim its output with 'dd' because it needs to verify the correct output size
tryCmp overlay/out.gb $gbtemp
rc=$(($? || $rc))