ref: 40c6b840f8078f6a4ac494d30c638696a115f3e2
parent: 5d6e0677d908ec67dc64038114b910b2bb73d62f
author: ISSOtm <eldredhabert0@gmail.com>
date: Sat Feb 20 22:40:29 EST 2021
Add tests for certain directives at EOF without a newline
--- /dev/null
+++ b/test/asm/endc-eof-newline-else.inc
@@ -1,0 +1,5 @@
+IF X
+ PRINTLN "Yes!"
+ELSE
+ PRINTLN "No."
+ENDC
\ No newline at end of file
--- /dev/null
+++ b/test/asm/endc-eof-newline.asm
@@ -1,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
\ No newline at end of file
--- /dev/null
+++ b/test/asm/endc-eof-newline.inc
@@ -1,0 +1,3 @@
+IF X
+ PRINTLN "Yosh!"
+ENDC
\ No newline at end of file
--- /dev/null
+++ b/test/asm/endc-eof-newline.out
@@ -1,0 +1,3 @@
+No.
+Yosh!
+Yes!
--- /dev/null
+++ b/test/asm/include-eof-newline.asm
@@ -1,0 +1,1 @@
+INCLUDE "include-eof-newline.inc"
\ No newline at end of file
--- /dev/null
+++ b/test/asm/include-eof-newline.inc
@@ -1,0 +1,1 @@
+ PRINTLN "Hi guys!"
--- /dev/null
+++ b/test/asm/include-eof-newline.out
@@ -1,0 +1,1 @@
+Hi guys!
--- /dev/null
+++ b/test/asm/syntax-error-eof-newline.asm
@@ -1,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"
--- /dev/null
+++ b/test/asm/syntax-error-eof-newline.err
@@ -1,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)!
--- /dev/null
+++ b/test/asm/syntax-error-eof-newline.inc
@@ -1,0 +1,1 @@
+ SECTION
--- /dev/null
+++ b/test/asm/syntax-error-eof-newline.out
@@ -1,0 +1,2 @@
+Before
+After
--- /dev/null
+++ b/test/asm/syntax-error-eof-newline.simple.err
@@ -1,0 +1,3 @@
+ERROR: syntax-error-eof-newline.asm(5) -> syntax-error-eof-newline.inc(1):
+ syntax error
+error: Assembly aborted (1 errors)!