test/tree_test.rb in trac-wiki-0.2.20 vs test/tree_test.rb in trac-wiki-0.2.21
- old
+ new
@@ -6,29 +6,31 @@
class Bacon::Context
end
describe TracWiki::Parser do
it 'should work' do
t = TracWiki::Tree.new
- t.tag_beg(:html)
- t.tag_beg(:body, {hus:'JAN', mistr: nil})
- t.tag(:div, {ahoj: "ahoj", bhoj: "BHOJ"})
+ t.tag_beg(:div, {:class => 'html'})
+ t.tag_beg(:div, {id:'JAN', class: nil})
+ t.tag(:div, {:class => "ahoj", id: "BHOJ"})
t.tag(:br)
t.add("bye")
t.add_spc
t.add("bye ")
t.add_spc
t.add("bye")
- t.tag_end(:body)
- t.tag_end(:html)
+ t.tag_end(:div)
+ t.tag_end(:div)
t.add('\bye')
t.add_raw('>')
t.add_raw(' ')
t.add_raw('„')
- res = "<html><body hus=\"JAN\"><div ahoj=\"ahoj\" bhoj=\"BHOJ\"/>\n<br/>bye bye bye</body></html>\\bye"
+ res = "<div class=\"html\"><div id=\"JAN\"><div class=\"ahoj\" id=\"BHOJ\"></div>\n<br/>bye bye bye</div>\n</div>\n\\bye"
res += ">"
- res += "\u00a0"
- res += "„"
+ #res += "\u00a0"
+ #res += "„"
+ res += ' '
+ res += '„'
#print "\n#{t.to_html}\n#{res}"
t.to_html.should.equal res
end
end