ref: f431b384a2b8c1d90e5de30a270b73e1776e8cec
parent: 7e3720b62720ee467c5379a56c3af3087b6bff42
author: AntonioND <[email protected]>
date: Mon Apr 3 16:46:18 EDT 2017
Add tests for rgblink options -t and -w Signed-off-by: AntonioND <[email protected]>
--- /dev/null
+++ b/test/link/romx-tiny-no-t.out
@@ -1,0 +1,1 @@
+rgblink:error:Unable to place 'r0b' (ROM0 section) anywhere
--- /dev/null
+++ b/test/link/romx-tiny-t.out
@@ -1,0 +1,1 @@
+rgblink:error:ROMX sections can't be used with option -t.
--- /dev/null
+++ b/test/link/romx-tiny.asm
@@ -1,0 +1,8 @@
+SECTION "r0a", ROM0
+DS $4000
+
+SECTION "rx", ROMX
+DS $4000
+
+SECTION "r0b", ROM0
+DS $4000
--- a/test/link/test.sh
+++ b/test/link/test.sh
@@ -10,3 +10,17 @@
diff bank-numbers.out $outtemp
head -c 20 $gbtemp > $otemp 2>&1
diff bank-numbers.out.bin $otemp
+
+$RGBASM -o $otemp wramx-contwram.asm
+$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
+diff wramx-contwram-no-w.out $outtemp
+$RGBLINK -w -o $gbtemp $otemp > $outtemp 2>&1
+diff wramx-contwram-w.out $outtemp
+
+$RGBASM -o $otemp romx-tiny.asm
+$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
+diff romx-tiny-no-t.out $outtemp
+$RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1
+diff romx-tiny-t.out $outtemp
+
+exit 0
--- a/test/link/update-refs.sh
+++ b/test/link/update-refs.sh
@@ -7,3 +7,13 @@
$RGBASM -o $otemp bank-numbers.asm
$RGBLINK -o $gbtemp $otemp > bank-numbers.out 2>&1
head -c 20 $gbtemp > bank-numbers.out.bin 2>&1
+
+$RGBASM -o $otemp wramx-contwram.asm
+$RGBLINK -o $gbtemp $otemp > wramx-contwram-no-w.out 2>&1
+$RGBLINK -w -o $gbtemp $otemp > wramx-contwram-w.out 2>&1
+
+$RGBASM -o $otemp romx-tiny.asm
+$RGBLINK -o $gbtemp $otemp > romx-tiny-no-t.out 2>&1
+$RGBLINK -t -o $gbtemp $otemp > romx-tiny-t.out 2>&1
+
+exit 0
--- /dev/null
+++ b/test/link/wramx-contwram-no-w.out
@@ -1,0 +1,1 @@
+rgblink:error:Unable to place 'w0b' (WRAM0 section) anywhere
--- /dev/null
+++ b/test/link/wramx-contwram-w.out
@@ -1,0 +1,1 @@
+rgblink:error:WRAMX sections can't be used with option -w.
--- /dev/null
+++ b/test/link/wramx-contwram.asm
@@ -1,0 +1,8 @@
+SECTION "w0a", WRAM0
+DS $1000
+
+SECTION "wx", WRAMX
+DS $1000
+
+SECTION "w0b", WRAM0
+DS $1000