Fix broken 'raw' tag parsing (issue #204)

This commit is contained in:
Florian Weingarten
2013-06-14 12:47:27 -04:00
parent 81f6c79c53
commit e47d1af03a
2 changed files with 16 additions and 6 deletions
+11 -2
View File
@@ -9,7 +9,16 @@ class RawTagTest < Test::Unit::TestCase
end
def test_output_in_raw
assert_template_result '{{ test }}',
'{% raw %}{{ test }}{% endraw %}'
assert_template_result '{{ test }}', '{% raw %}{{ test }}{% endraw %}'
end
def test_open_tag_in_raw
assert_template_result ' Foobar {% invalid ', '{% raw %} Foobar {% invalid {% endraw %}'
assert_template_result ' Foobar invalid %} ', '{% raw %} Foobar invalid %} {% endraw %}'
assert_template_result ' Foobar {{ invalid ', '{% raw %} Foobar {{ invalid {% endraw %}'
assert_template_result ' Foobar invalid }} ', '{% raw %} Foobar invalid }} {% endraw %}'
assert_template_result ' Foobar {% invalid {% {% endraw ', '{% raw %} Foobar {% invalid {% {% endraw {% endraw %}'
assert_template_result ' Foobar {% {% {% ', '{% raw %} Foobar {% {% {% {% endraw %}'
assert_template_result ' test {% raw %} {% endraw %}', '{% raw %} test {% raw %} {% {% endraw %}endraw %}'
end
end