Handle missing newline at EOF for linkerscript INCLUDEd files (#1691)

This commit is contained in:
Rangi
2025-05-22 04:55:58 -04:00
committed by GitHub
parent 5d998ef483
commit 804db4e073
9 changed files with 32 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
section "a", rom0
db $11

View File

@@ -0,0 +1,3 @@
rom0
org 0
"a" ; no newline

View File

@@ -0,0 +1,2 @@
section "b", rom0
db $22

View File

@@ -0,0 +1,3 @@
rom0
org 1
"b" ; yes newline

View File

View File

@@ -0,0 +1 @@
"

View File

@@ -0,0 +1,2 @@
include "script-include/a.inc"
include "script-include/b.inc"

View File

@@ -262,6 +262,16 @@ tryDiff "$test"/out.err "$outtemp"
tryCmpRomSize "$gbtemp" 65536
evaluateTest
test="script-include"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm
"$RGBASM" -o "$gbtemp2" "$test"/b.asm
continueTest
rgblinkQuiet -o "$gbtemp" -l "$test"/script.link "$otemp" "$gbtemp2" 2>"$outtemp"
tryDiff "$test"/out.err "$outtemp"
tryCmpRom "$test"/ref.out.bin
evaluateTest
test="sdcc/good"
startTest
"$RGBASM" -o "$otemp" "$test"/a.asm