mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Remove ExpressionParser in favor of ParseContext#safe_parse
This commit is contained in:
committed by
Guilherme Carreiro
parent
d56e3c50f9
commit
e413104e78
@@ -42,25 +42,14 @@ class ExpressionTest < Minitest::Test
|
||||
assert_template_result("3..4", "{{ ( 3 .. 4 ) }}")
|
||||
assert_expression_result(1..2, "(1..2)")
|
||||
|
||||
if Liquid::Environment.default.error_mode == :rigid
|
||||
assert_match_syntax_error(
|
||||
'Invalid expression type in range expression in "{{ (false..true) }}"',
|
||||
"{{ (false..true) }}",
|
||||
)
|
||||
assert_match_syntax_error(
|
||||
'Liquid syntax error (line 1): Invalid expression type in range expression in "{{ ((1..2)..3) }}"',
|
||||
"{{ ((1..2)..3) }}",
|
||||
)
|
||||
else
|
||||
assert_match_syntax_error(
|
||||
"Liquid syntax error (line 1): Invalid expression type 'false' in range expression",
|
||||
"{{ (false..true) }}",
|
||||
)
|
||||
assert_match_syntax_error(
|
||||
"Liquid syntax error (line 1): Invalid expression type '(1..2)' in range expression",
|
||||
"{{ ((1..2)..3) }}",
|
||||
)
|
||||
end
|
||||
assert_match_syntax_error(
|
||||
"Liquid syntax error (line 1): Invalid expression type 'false' in range expression",
|
||||
"{{ (false..true) }}",
|
||||
)
|
||||
assert_match_syntax_error(
|
||||
"Liquid syntax error (line 1): Invalid expression type '(1..2)' in range expression",
|
||||
"{{ ((1..2)..3) }}",
|
||||
)
|
||||
end
|
||||
|
||||
def test_quirky_negative_sign_expression_markup
|
||||
|
||||
Reference in New Issue
Block a user