Fix handling of unknown tags in comments

This commit is contained in:
Florian Weingarten
2013-09-11 10:40:33 -04:00
parent 01d352bc51
commit 45795f8766
2 changed files with 9 additions and 1 deletions
+6
View File
@@ -34,6 +34,12 @@ class StandardTagTest < Test::Unit::TestCase
assert_template_result('','{%comment%}comment{%endcomment%}')
assert_template_result('','{% comment %}comment{% endcomment %}')
assert_template_result('','{%comment%}{%blabla%}{%endcomment%}')
assert_template_result('','{% comment %}{% blabla %}{% endcomment %}')
assert_template_result('','{%comment%}{% endif %}{%endcomment%}')
assert_template_result('','{% comment %}{% endwhatever %}{% endcomment %}')
assert_template_result('','{% comment %} {{ %} {{%%%}} {% endcomment {% endcomment %}')
assert_template_result('foobar','foo{%comment%}comment{%endcomment%}bar')
assert_template_result('foobar','foo{% comment %}comment{% endcomment %}bar')
assert_template_result('foobar','foo{%comment%} comment {%endcomment%}bar')