From dc58a4d648894098da114e5cc79c30702f8708c1 Mon Sep 17 00:00:00 2001 From: Tristan Hume Date: Mon, 11 Aug 2014 11:58:36 -0400 Subject: [PATCH] Add quirks test for unanchored filter args --- test/integration/parsing_quirks_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/integration/parsing_quirks_test.rb b/test/integration/parsing_quirks_test.rb index 0701530..5dcacda 100644 --- a/test/integration/parsing_quirks_test.rb +++ b/test/integration/parsing_quirks_test.rb @@ -87,4 +87,17 @@ class ParsingQuirksTest < Minitest::Test 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