mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Fix bad range parsing.
This commit is contained in:
@@ -56,6 +56,14 @@ class ParserTest < Test::Unit::TestCase
|
||||
assert_equal '"wut"', p.expression
|
||||
end
|
||||
|
||||
def test_ranges
|
||||
p = Parser.new("(5..7) (1.5..9.6) (young..old) (hi[5].wat..old)")
|
||||
assert_equal '(5..7)', p.expression
|
||||
assert_equal '(1.5..9.6)', p.expression
|
||||
assert_equal '(young..old)', p.expression
|
||||
assert_equal '(hi[5].wat..old)', p.expression
|
||||
end
|
||||
|
||||
def test_arguments
|
||||
p = Parser.new("filter: hi.there[5], keyarg: 7")
|
||||
assert_equal 'filter', p.consume(:id)
|
||||
|
||||
Reference in New Issue
Block a user