mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add tests for certain directives at EOF without a newline
This commit is contained in:
5
test/asm/endc-eof-newline-else.inc
Normal file
5
test/asm/endc-eof-newline-else.inc
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
IF X
|
||||||
|
PRINTLN "Yes!"
|
||||||
|
ELSE
|
||||||
|
PRINTLN "No."
|
||||||
|
ENDC
|
||||||
8
test/asm/endc-eof-newline.asm
Normal file
8
test/asm/endc-eof-newline.asm
Normal file
@@ -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
test/asm/endc-eof-newline.err
Normal file
0
test/asm/endc-eof-newline.err
Normal file
3
test/asm/endc-eof-newline.inc
Normal file
3
test/asm/endc-eof-newline.inc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
IF X
|
||||||
|
PRINTLN "Yosh!"
|
||||||
|
ENDC
|
||||||
3
test/asm/endc-eof-newline.out
Normal file
3
test/asm/endc-eof-newline.out
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
No.
|
||||||
|
Yosh!
|
||||||
|
Yes!
|
||||||
1
test/asm/include-eof-newline.asm
Normal file
1
test/asm/include-eof-newline.asm
Normal file
@@ -0,0 +1 @@
|
|||||||
|
INCLUDE "include-eof-newline.inc"
|
||||||
0
test/asm/include-eof-newline.err
Normal file
0
test/asm/include-eof-newline.err
Normal file
1
test/asm/include-eof-newline.inc
Normal file
1
test/asm/include-eof-newline.inc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PRINTLN "Hi guys!"
|
||||||
1
test/asm/include-eof-newline.out
Normal file
1
test/asm/include-eof-newline.out
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Hi guys!
|
||||||
6
test/asm/syntax-error-eof-newline.asm
Normal file
6
test/asm/syntax-error-eof-newline.asm
Normal file
@@ -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"
|
||||||
3
test/asm/syntax-error-eof-newline.err
Normal file
3
test/asm/syntax-error-eof-newline.err
Normal file
@@ -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)!
|
||||||
1
test/asm/syntax-error-eof-newline.inc
Normal file
1
test/asm/syntax-error-eof-newline.inc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SECTION
|
||||||
2
test/asm/syntax-error-eof-newline.out
Normal file
2
test/asm/syntax-error-eof-newline.out
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Before
|
||||||
|
After
|
||||||
3
test/asm/syntax-error-eof-newline.simple.err
Normal file
3
test/asm/syntax-error-eof-newline.simple.err
Normal file
@@ -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