mirror of https://github.com/django/django.git
Improved TokenType.COMMENT test by using correct block syntax in template tests.
This commit is contained in:
parent
fd92f24789
commit
d50f61be7f
|
@ -8,7 +8,7 @@ class LexerTestMixin:
|
||||||
template_string = (
|
template_string = (
|
||||||
"text\n"
|
"text\n"
|
||||||
"{% if test %}{{ varvalue }}{% endif %}"
|
"{% if test %}{{ varvalue }}{% endif %}"
|
||||||
"{#comment {{not a var}} %{not a block}% #}"
|
"{#comment {{not a var}} {%not a block%} #}"
|
||||||
"end text"
|
"end text"
|
||||||
)
|
)
|
||||||
expected_token_tuples = [
|
expected_token_tuples = [
|
||||||
|
@ -17,7 +17,7 @@ class LexerTestMixin:
|
||||||
(TokenType.BLOCK, "if test", 2, (5, 18)),
|
(TokenType.BLOCK, "if test", 2, (5, 18)),
|
||||||
(TokenType.VAR, "varvalue", 2, (18, 32)),
|
(TokenType.VAR, "varvalue", 2, (18, 32)),
|
||||||
(TokenType.BLOCK, "endif", 2, (32, 43)),
|
(TokenType.BLOCK, "endif", 2, (32, 43)),
|
||||||
(TokenType.COMMENT, "comment {{not a var}} %{not a block}%", 2, (43, 85)),
|
(TokenType.COMMENT, "comment {{not a var}} {%not a block%}", 2, (43, 85)),
|
||||||
(TokenType.TEXT, "end text", 2, (85, 93)),
|
(TokenType.TEXT, "end text", 2, (85, 93)),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue