mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
rejects variables like a/b in for loops, closes #150
This commit is contained in:
@@ -281,4 +281,10 @@ HERE
|
||||
def test_blank_string_not_iterable
|
||||
assert_template_result('', "{% for char in characters %}I WILL NOT BE OUTPUT{% endfor %}", 'characters' => '')
|
||||
end
|
||||
|
||||
def test_bad_variable_naming_in_for_loop
|
||||
assert_raise(Liquid::SyntaxError) do
|
||||
Liquid::Template.parse('{% for a/b in x %}{% endfor %}')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user