mirror of
https://github.com/kemko/liquid.git
synced 2026-01-06 18:25:41 +03:00
blank and empty as variable names
This commit is contained in:
@@ -24,6 +24,16 @@ class VariableTest < Minitest::Test
|
||||
assert_equal '', template.render!
|
||||
end
|
||||
|
||||
def test_using_blank_as_variable_name
|
||||
template = Template.parse("{% assign foo = blank %}{{ foo }}")
|
||||
assert_equal '', template.render!
|
||||
end
|
||||
|
||||
def test_using_empty_as_variable_name
|
||||
template = Template.parse("{% assign foo = empty %}{{ foo }}")
|
||||
assert_equal '', template.render!
|
||||
end
|
||||
|
||||
def test_hash_scoping
|
||||
template = Template.parse(%({{ test.test }}))
|
||||
assert_equal 'worked', template.render!('test' => { 'test' => 'worked' })
|
||||
|
||||
Reference in New Issue
Block a user