mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Raise SyntaxError if raw tag is unclosed
This commit is contained in:
@@ -22,4 +22,8 @@ class RawTagTest < Minitest::Test
|
||||
assert_template_result ' test {% raw %} {% endraw %}', '{% raw %} test {% raw %} {% {% endraw %}endraw %}'
|
||||
assert_template_result ' Foobar {{ invalid 1', '{% raw %} Foobar {{ invalid {% endraw %}{{ 1 }}'
|
||||
end
|
||||
|
||||
def test_invalid_raw
|
||||
assert_match_syntax_error /tag was never closed/, '{% raw } foo {% endraw %}'
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ module Minitest
|
||||
assert_match expected, Template.parse(template).render!(assigns), message
|
||||
end
|
||||
|
||||
def assert_match_syntax_error(match, template, registers = {})
|
||||
def assert_match_syntax_error(match, template, assigns = {})
|
||||
exception = assert_raises(Liquid::SyntaxError) {
|
||||
Template.parse(template).render(assigns)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user