mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-02 16:45:12 -07:00
Initial github import of liquid
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
require File.dirname(__FILE__) + '/helper'
|
||||
|
||||
class ParsingQuirksTest < Test::Unit::TestCase
|
||||
include Liquid
|
||||
|
||||
def test_error_with_css
|
||||
text = %| div { font-weight: bold; } |
|
||||
template = Template.parse(text)
|
||||
|
||||
assert_equal text, template.render
|
||||
assert_equal [String], template.root.nodelist.collect {|i| i.class}
|
||||
end
|
||||
|
||||
def test_raise_on_single_close_bracet
|
||||
assert_raise(SyntaxError) do
|
||||
Template.parse("text {{method} oh nos!")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def test_error_on_empty_filter
|
||||
assert_nothing_raised do
|
||||
Template.parse("{{test |a|b|}}")
|
||||
Template.parse("{{test}}")
|
||||
Template.parse("{{|test|}}")
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user