mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 09:05:13 -07:00
add a quirky comment tag unit test
This commit is contained in:
@@ -20,6 +20,16 @@ class CommentTagUnitTest < Minitest::Test
|
|||||||
assert_equal("", template.render)
|
assert_equal("", template.render)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_allows_incomplete_tags_inside_a_comment
|
||||||
|
template = Liquid::Template.parse(<<~LIQUID.chomp, line_numbers: true)
|
||||||
|
{% comment %}
|
||||||
|
{% assign foo = "1"
|
||||||
|
{% endcomment %}
|
||||||
|
LIQUID
|
||||||
|
|
||||||
|
assert_equal("", template.render)
|
||||||
|
end
|
||||||
|
|
||||||
def test_child_comment_tags_need_to_be_closed
|
def test_child_comment_tags_need_to_be_closed
|
||||||
template = Liquid::Template.parse(<<~LIQUID.chomp, line_numbers: true)
|
template = Liquid::Template.parse(<<~LIQUID.chomp, line_numbers: true)
|
||||||
{% comment %}
|
{% comment %}
|
||||||
|
|||||||
Reference in New Issue
Block a user