From 4c6166f989bf2ca923d5a24d74bb8170c6aa330c Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Wed, 21 Oct 2020 16:30:17 -0400 Subject: [PATCH] Add parsing quirk test for lookup on variable with literal name (#1325) --- test/integration/parsing_quirks_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration/parsing_quirks_test.rb b/test/integration/parsing_quirks_test.rb index 6b84ec5..5851795 100644 --- a/test/integration/parsing_quirks_test.rb +++ b/test/integration/parsing_quirks_test.rb @@ -122,6 +122,12 @@ class ParsingQuirksTest < Minitest::Test assert_template_result('', "{{}}") end + def test_lookup_on_var_with_literal_name + assigns = { "blank" => { "x" => "result" } } + assert_template_result('result', "{{ blank.x }}", assigns) + assert_template_result('result', "{{ blank['x'] }}", assigns) + end + def test_contains_in_id assert_template_result(' YES ', '{% if containsallshipments == true %} YES {% endif %}', 'containsallshipments' => true) end