diff --git a/test/link/load-fragment/a.asm b/test/link/load-fragment/a.asm new file mode 100644 index 00000000..8dbd349b --- /dev/null +++ b/test/link/load-fragment/a.asm @@ -0,0 +1,4 @@ +SECTION "main", ROM0 +LOAD FRAGMENT "test", SRAM + db 0 +ENDL diff --git a/test/link/load-fragment/b.asm b/test/link/load-fragment/b.asm new file mode 100644 index 00000000..c0a63f08 --- /dev/null +++ b/test/link/load-fragment/b.asm @@ -0,0 +1,7 @@ + +SECTION "SECTION2", ROM0 +LOAD FRAGMENT "test", SRAM + jr Label +Label: + dw Label +ENDL diff --git a/test/link/load-fragment/out.err b/test/link/load-fragment/out.err new file mode 100644 index 00000000..e69de29b diff --git a/test/link/load-fragment/out.gb b/test/link/load-fragment/out.gb new file mode 100644 index 00000000..0b5f8c62 Binary files /dev/null and b/test/link/load-fragment/out.gb differ diff --git a/test/link/test.sh b/test/link/test.sh index 34709567..9ad7d1bb 100755 --- a/test/link/test.sh +++ b/test/link/test.sh @@ -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))