diff --git a/test/asm/endc-eof-newline-else.inc b/test/asm/endc-eof-newline-else.inc new file mode 100644 index 00000000..3c9ed231 --- /dev/null +++ b/test/asm/endc-eof-newline-else.inc @@ -0,0 +1,5 @@ +IF X + PRINTLN "Yes!" +ELSE + PRINTLN "No." +ENDC \ No newline at end of file diff --git a/test/asm/endc-eof-newline.asm b/test/asm/endc-eof-newline.asm new file mode 100644 index 00000000..588f5c8c --- /dev/null +++ b/test/asm/endc-eof-newline.asm @@ -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 \ No newline at end of file diff --git a/test/asm/endc-eof-newline.err b/test/asm/endc-eof-newline.err new file mode 100644 index 00000000..e69de29b diff --git a/test/asm/endc-eof-newline.inc b/test/asm/endc-eof-newline.inc new file mode 100644 index 00000000..f05c3f6e --- /dev/null +++ b/test/asm/endc-eof-newline.inc @@ -0,0 +1,3 @@ +IF X + PRINTLN "Yosh!" +ENDC \ No newline at end of file diff --git a/test/asm/endc-eof-newline.out b/test/asm/endc-eof-newline.out new file mode 100644 index 00000000..68764844 --- /dev/null +++ b/test/asm/endc-eof-newline.out @@ -0,0 +1,3 @@ +No. +Yosh! +Yes! diff --git a/test/asm/include-eof-newline.asm b/test/asm/include-eof-newline.asm new file mode 100644 index 00000000..fa6415da --- /dev/null +++ b/test/asm/include-eof-newline.asm @@ -0,0 +1 @@ +INCLUDE "include-eof-newline.inc" \ No newline at end of file diff --git a/test/asm/include-eof-newline.err b/test/asm/include-eof-newline.err new file mode 100644 index 00000000..e69de29b diff --git a/test/asm/include-eof-newline.inc b/test/asm/include-eof-newline.inc new file mode 100644 index 00000000..24352778 --- /dev/null +++ b/test/asm/include-eof-newline.inc @@ -0,0 +1 @@ + PRINTLN "Hi guys!" diff --git a/test/asm/include-eof-newline.out b/test/asm/include-eof-newline.out new file mode 100644 index 00000000..5cbac9af --- /dev/null +++ b/test/asm/include-eof-newline.out @@ -0,0 +1 @@ +Hi guys! diff --git a/test/asm/syntax-error-eof-newline.asm b/test/asm/syntax-error-eof-newline.asm new file mode 100644 index 00000000..7db76e49 --- /dev/null +++ b/test/asm/syntax-error-eof-newline.asm @@ -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" diff --git a/test/asm/syntax-error-eof-newline.err b/test/asm/syntax-error-eof-newline.err new file mode 100644 index 00000000..2eaee123 --- /dev/null +++ b/test/asm/syntax-error-eof-newline.err @@ -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)! diff --git a/test/asm/syntax-error-eof-newline.inc b/test/asm/syntax-error-eof-newline.inc new file mode 100644 index 00000000..1f6dc36e --- /dev/null +++ b/test/asm/syntax-error-eof-newline.inc @@ -0,0 +1 @@ + SECTION diff --git a/test/asm/syntax-error-eof-newline.out b/test/asm/syntax-error-eof-newline.out new file mode 100644 index 00000000..f3a08f7d --- /dev/null +++ b/test/asm/syntax-error-eof-newline.out @@ -0,0 +1,2 @@ +Before +After diff --git a/test/asm/syntax-error-eof-newline.simple.err b/test/asm/syntax-error-eof-newline.simple.err new file mode 100644 index 00000000..43f74631 --- /dev/null +++ b/test/asm/syntax-error-eof-newline.simple.err @@ -0,0 +1,3 @@ +ERROR: syntax-error-eof-newline.asm(5) -> syntax-error-eof-newline.inc(1): + syntax error +error: Assembly aborted (1 errors)!