Allow filters in assign.

A simple attempt, but basically it shifts the parsing of the right hand side of the assign from a simple context lookup to using the Variable parser (that includes filters). Fixes #79.
This commit is contained in:
Ryan Alyea
2011-11-01 01:46:26 -07:00
parent 745d875e79
commit 975b17b529
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -12,4 +12,10 @@ class AssignTest < Test::Unit::TestCase
'{% assign foo = values %}.{{ foo[1] }}.',
'values' => %w{foo bar baz})
end
def test_assign_with_filter
assert_template_result('.bar.',
'{% assign foo = values | split: "," %}.{{ foo[1] }}.',
'values' => "foo,bar,baz")
end
end # AssignTest