Merge pull request #506 from Shopify/fix_capture_with_hyphen

Use VariableSignature as Syntax for Capture tag to allow hyphens in variable names
This commit is contained in:
Florian Weingarten
2015-01-23 10:37:52 -05:00
committed by Arthur Neves
parent 9faf8f9a56
commit cbc163ba1c
3 changed files with 21 additions and 1 deletions
+10
View File
@@ -3,6 +3,16 @@ require 'test_helper'
class AssignTest < Minitest::Test
include Liquid
def test_assign_with_hyphen_in_variable_name
template_source = <<-END_TEMPLATE
{% assign this-thing = 'Print this-thing' %}
{{ this-thing }}
END_TEMPLATE
template = Template.parse(template_source)
rendered = template.render!
assert_equal "Print this-thing", rendered.strip
end
def test_assigned_variable
assert_template_result('.foo.',
'{% assign foo = values %}.{{ foo[0] }}.',