Add tests for certain directives at EOF without a newline

This commit is contained in:
ISSOtm
2021-02-21 03:40:29 +01:00
committed by Rangi
parent 5d6e0677d9
commit 40c6b840f8
14 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
IF X
PRINTLN "Yes!"
ELSE
PRINTLN "No."
ENDC

View 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

View File

View File

@@ -0,0 +1,3 @@
IF X
PRINTLN "Yosh!"
ENDC

View File

@@ -0,0 +1,3 @@
No.
Yosh!
Yes!

View File

@@ -0,0 +1 @@
INCLUDE "include-eof-newline.inc"

View File

View File

@@ -0,0 +1 @@
PRINTLN "Hi guys!"

View File

@@ -0,0 +1 @@
Hi guys!

View 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"

View 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)!

View File

@@ -0,0 +1 @@
SECTION

View File

@@ -0,0 +1,2 @@
Before
After

View 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)!