summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-07-12 15:26:33 +0200
committerGitHub <noreply@github.com>2022-07-12 15:26:33 +0200
commit1219d7efa170bf38fb1bf6a10fa0d1f96e62f091 (patch)
treebc7572abb64a48b57641902c028074eaab87ef0a /tests
parent0229aea78553da64ebdc128257e8ab43c300842c (diff)
parentfd433aa285ff2b4f6270d6993d1b258ad48af36e (diff)
Merge pull request #95 from jow-/lexer-fix-non-lstrip-parsing
lexer: fix parsing with disabled block left stripping
Diffstat (limited to 'tests')
-rw-r--r--tests/custom/04_bugs/40_lexer_bug_on_lstrip_off20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/custom/04_bugs/40_lexer_bug_on_lstrip_off b/tests/custom/04_bugs/40_lexer_bug_on_lstrip_off
new file mode 100644
index 0000000..dc4f8dd
--- /dev/null
+++ b/tests/custom/04_bugs/40_lexer_bug_on_lstrip_off
@@ -0,0 +1,20 @@
+When a template was parsed with global block left stripping disabled,
+then any text preceding an expression or statement block start tag was
+incorrectly prepended to the first token value of the block, leading
+to syntax errors in the compiler.
+
+-- Testcase --
+{% for (let x in [1, 2, 3]): %}
+{{ x }}
+{% endfor %}
+-- End --
+
+-- Args --
+-Tno-lstrip
+-- End --
+
+-- Expect stdout --
+1
+2
+3
+-- End --