mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Hamlit regards limited attributes as boolean
This commit is contained in:
parent
b88145c663
commit
603214c419
3 changed files with 6 additions and 4 deletions
|
@ -209,7 +209,7 @@ HAML
|
|||
end
|
||||
|
||||
def test_nil_should_render_empty_tag
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy boolean attributes for optimization'
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy non-boolean attributes for optimization'
|
||||
assert_equal("<div class='no_attributes'></div>",
|
||||
render(".no_attributes{:nil => nil}").chomp)
|
||||
end
|
||||
|
@ -323,7 +323,7 @@ HAML
|
|||
end
|
||||
|
||||
def test_dynamic_attributes_with_empty_attr
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy boolean attributes for optimization'
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy non-boolean attributes for optimization'
|
||||
assert_equal("<img alt='' src='/foo.png'>\n", render("%img{:width => nil, :src => '/foo.png', :alt => String.new}"))
|
||||
end
|
||||
|
||||
|
@ -414,7 +414,7 @@ HAML
|
|||
end
|
||||
|
||||
def test_boolean_attributes
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy boolean attributes for optimization'
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy non-boolean attributes for optimization'
|
||||
assert_equal("<p bar baz='true' foo='bar'></p>\n",
|
||||
render("%p{:foo => 'bar', :bar => true, :baz => 'true'}", :format => :html4))
|
||||
assert_equal("<p bar='bar' baz='true' foo='bar'></p>\n",
|
||||
|
@ -1184,7 +1184,7 @@ HAML
|
|||
end
|
||||
|
||||
def test_nil_attrs
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy boolean attributes for optimization'
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy non-boolean attributes for optimization'
|
||||
assert_equal("<p>nil</p>\n", render("%p{ :attr => nil } nil"))
|
||||
assert_equal("<p>nil</p>\n", render("%p{ :attr => x } nil", :locals => {:x => nil}))
|
||||
end
|
||||
|
|
|
@ -588,6 +588,7 @@ class PrettyTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_HTML_style_tag_with_an_atomic_attribute
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy non-boolean attributes for optimization'
|
||||
haml = %q{%a(flag)}
|
||||
html = %q{<a flag></a>}
|
||||
locals = {}
|
||||
|
|
|
@ -588,6 +588,7 @@ class UglyTest < MiniTest::Test
|
|||
end
|
||||
|
||||
def test_HTML_style_tag_with_an_atomic_attribute
|
||||
skip '[INCOMPATIBILITY] Hamlit does not delete falsy non-boolean attributes for optimization'
|
||||
haml = %q{%a(flag)}
|
||||
html = %q{<a flag></a>}
|
||||
locals = {}
|
||||
|
|
Loading…
Reference in a new issue