mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add LOAD FRAGMENT pc test (#800)
Reproduces a reported problem, fix pending
This commit is contained in:
4
test/link/load-fragment/a.asm
Normal file
4
test/link/load-fragment/a.asm
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
SECTION "main", ROM0
|
||||||
|
LOAD FRAGMENT "test", SRAM
|
||||||
|
db 0
|
||||||
|
ENDL
|
||||||
7
test/link/load-fragment/b.asm
Normal file
7
test/link/load-fragment/b.asm
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
SECTION "SECTION2", ROM0
|
||||||
|
LOAD FRAGMENT "test", SRAM
|
||||||
|
jr Label
|
||||||
|
Label:
|
||||||
|
dw Label
|
||||||
|
ENDL
|
||||||
0
test/link/load-fragment/out.err
Normal file
0
test/link/load-fragment/out.err
Normal file
BIN
test/link/load-fragment/out.gb
Normal file
BIN
test/link/load-fragment/out.gb
Normal file
Binary file not shown.
@@ -130,13 +130,24 @@ rgblinkQuiet -o $gbtemp2 $otemp
|
|||||||
tryCmp $gbtemp $gbtemp2
|
tryCmp $gbtemp $gbtemp2
|
||||||
rc=$(($? || $rc))
|
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"
|
i="overlay.asm"
|
||||||
startTest
|
startTest
|
||||||
$RGBASM -o $otemp overlay/a.asm
|
$RGBASM -o $otemp overlay/a.asm
|
||||||
rgblinkQuiet -o $gbtemp -t -O overlay/overlay.gb $otemp > $outtemp 2>&1
|
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
|
tryDiff overlay/out.err $outtemp
|
||||||
rc=$(($? || $rc))
|
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
|
tryCmp overlay/out.gb $gbtemp
|
||||||
rc=$(($? || $rc))
|
rc=$(($? || $rc))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user