Remove to_liquid conversion from StandardFilters

This commit is contained in:
Thierry Joyal
2022-03-04 13:31:35 -05:00
parent e2450af4e6
commit ea38871260
5 changed files with 55 additions and 27 deletions
+2
View File
@@ -149,6 +149,8 @@ class DropsTest < Minitest::Test
assert_equal(' carrot ', output)
end
# This test succeed in the ruby implementation, but not in liquid-c
# See Context#contextualize
def test_context_drop_array_with_map
output = Liquid::Template.parse(' {{ contexts | map: "bar" }} ').render!('contexts' => [ContextDrop.new, ContextDrop.new], 'bar' => "carrot")
assert_equal(' carrotcarrot ', output)
+4
View File
@@ -417,6 +417,8 @@ class StandardFiltersTest < Minitest::Test
assert_template_result("", '{{ "foo" | map: "inspect" }}')
end
# This test succeed in the ruby implementation, but not in liquid-c
# See Context#contextualize
def test_map_calls_to_liquid
t = TestThing.new
assert_template_result("woot: 1", '{{ foo | map: "whatever" }}', "foo" => [t])
@@ -433,6 +435,8 @@ class StandardFiltersTest < Minitest::Test
assert_template_result("42", template, "thing" => hash)
end
# This test succeed in the ruby implementation, but not in liquid-c
# See Context#contextualize
def test_sort_calls_to_liquid
t = TestThing.new
Liquid::Template.parse('{{ foo | sort: "whatever" }}').render("foo" => [t])