summaryrefslogtreecommitdiffhomepage
path: root/tests/custom
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-04-29 00:02:06 +0200
committerJo-Philipp Wich <jo@mein.io>2021-04-29 00:11:02 +0200
commit0e245093909c0445267187b1f396630301965f1a (patch)
treeefd97e10e245cb2f257ed6608c4b8d4b1c94fb2a /tests/custom
parente66b2ad400203c27d7a17edea2b9952f110e9020 (diff)
lib: fix reporting source context lines at EOF
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom')
-rw-r--r--tests/custom/03_bugs/14_incomplete_expression_at_eof16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/custom/03_bugs/14_incomplete_expression_at_eof b/tests/custom/03_bugs/14_incomplete_expression_at_eof
new file mode 100644
index 0000000..474e87c
--- /dev/null
+++ b/tests/custom/03_bugs/14_incomplete_expression_at_eof
@@ -0,0 +1,16 @@
+When an incomplete expression was parsed at the very end of the input
+buffer, the source code context line was not properly printed.
+
+-- Expect stderr --
+Syntax error: Expecting expression
+In line 1, byte 7:
+
+ `{% 1+`
+ ^-- Near here
+
+
+-- End --
+
+-- Testcase --
+{% 1+
+-- End --