mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-16 14:41:44 +00:00
Add tests for certain directives at EOF without a newline
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
IF X
|
||||||
|
PRINTLN "Yes!"
|
||||||
|
ELSE
|
||||||
|
PRINTLN "No."
|
||||||
|
ENDC
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
IF 1
|
||||||
|
X = 0
|
||||||
|
INCLUDE "endc-eof-newline.inc"
|
||||||
|
INCLUDE "endc-eof-newline-else.inc"
|
||||||
|
X = 1
|
||||||
|
INCLUDE "endc-eof-newline.inc"
|
||||||
|
INCLUDE "endc-eof-newline-else.inc"
|
||||||
|
ENDC
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
IF X
|
||||||
|
PRINTLN "Yosh!"
|
||||||
|
ENDC
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
No.
|
||||||
|
Yosh!
|
||||||
|
Yes!
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
INCLUDE "include-eof-newline.inc"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
PRINTLN "Hi guys!"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Hi guys!
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
; Syntax errors at the end of a buffer (here, the INCLUDEd file) should be reported in their file,
|
||||||
|
; not in the parent context (here, this file).
|
||||||
|
|
||||||
|
PRINTLN "Before"
|
||||||
|
INCLUDE "syntax-error-eof-newline.inc"
|
||||||
|
PRINTLN "After"
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: syntax-error-eof-newline.asm(5) -> syntax-error-eof-newline.inc(1):
|
||||||
|
syntax error, unexpected newline
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SECTION
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Before
|
||||||
|
After
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: syntax-error-eof-newline.asm(5) -> syntax-error-eof-newline.inc(1):
|
||||||
|
syntax error
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
Reference in New Issue
Block a user