mirror of
https://github.com/kemko/liquid.git
synced 2026-01-02 00:05:42 +03:00
Compare commits
1 Commits
default-fi
...
pz-test-in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8493f95acb |
2
Gemfile
2
Gemfile
@@ -22,6 +22,6 @@ group :test do
|
||||
gem 'rubocop-performance', require: false
|
||||
|
||||
platform :mri, :truffleruby do
|
||||
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'master'
|
||||
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'pz-fix-invalid-float'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -131,4 +131,16 @@ class ParsingQuirksTest < Minitest::Test
|
||||
def test_contains_in_id
|
||||
assert_template_result(' YES ', '{% if containsallshipments == true %} YES {% endif %}', 'containsallshipments' => true)
|
||||
end
|
||||
|
||||
def test_invalid_float_with_no_leading_integer
|
||||
with_error_mode(:lax) do
|
||||
assert_template_result("", "{{ -.1 }}")
|
||||
assert_template_result("", "{{ .1 }}")
|
||||
end
|
||||
|
||||
with_error_mode(:strict) do
|
||||
assert_raises(SyntaxError) { Template.parse("{{ -.1 }}") }
|
||||
assert_raises(SyntaxError) { Template.parse("{{ .1 }}") }
|
||||
end
|
||||
end
|
||||
end # ParsingQuirksTest
|
||||
|
||||
Reference in New Issue
Block a user