summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/03_bugs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-04-29 17:52:18 +0200
committerJo-Philipp Wich <jo@mein.io>2021-04-29 17:52:18 +0200
commit2bc9bace716fafa408dfc6683ca3ff0f9d8bc44b (patch)
tree0f0e3480be9e72deac5b36ed8b93142d816b426f /tests/custom/03_bugs
parentf73e20158641a96882565852d0e2a6bf1540d950 (diff)
lexer: fix infinite loop on parsing unterminated expression blocks
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/03_bugs')
-rw-r--r--tests/custom/03_bugs/17_hang_on_unclosed_expression_block16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/custom/03_bugs/17_hang_on_unclosed_expression_block b/tests/custom/03_bugs/17_hang_on_unclosed_expression_block
new file mode 100644
index 0000000..25128bb
--- /dev/null
+++ b/tests/custom/03_bugs/17_hang_on_unclosed_expression_block
@@ -0,0 +1,16 @@
+When parsing an unclosed expression block, the lexer did end up in an
+infinite loop.
+
+-- Expect stderr --
+Syntax error: Unterminated template block
+In line 1, byte 6:
+
+ `{{ 1`
+ ^-- Near here
+
+
+-- End --
+
+-- Testcase --
+{{ 1
+-- End --