mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Add quirks test for unanchored filter args
This commit is contained in:
@@ -87,4 +87,17 @@ class ParsingQuirksTest < Minitest::Test
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_unanchored_filter_arguments
|
||||||
|
with_error_mode(:lax) do
|
||||||
|
assert_template_result('hi',"{{ 'hi there' | split$$$:' ' | first }}")
|
||||||
|
|
||||||
|
var = Variable.new("('x' | downcase)")
|
||||||
|
assert_equal [['downcase',[]]], var.filters
|
||||||
|
assert_equal "('x'", var.name
|
||||||
|
|
||||||
|
var = Variable.new("variant.title | escape | remove:\"\"\" | remove: \"'\"")
|
||||||
|
assert_equal [["escape", []], ["remove", ["\"\""]]], var.filters
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end # ParsingQuirksTest
|
end # ParsingQuirksTest
|
||||||
|
|||||||
Reference in New Issue
Block a user