Sha256: 5df73b99aae340c7caf5750faf39621e128497e4deba0982fc4d37109563b45a

Contents?: true

Size: 715 Bytes

Versions: 2

Compression:

Stored size: 715 Bytes

Contents

# encoding: UTF-8

require 'trac-wiki'
require 'pp'

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(: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.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 += "&gt;"
   res += "\u00a0"
   res += "„"

   #print "\n#{t.to_html}\n#{res}"
   t.to_html.should.equal res
 end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trac-wiki-0.2.20 test/tree_test.rb
trac-wiki-0.2.16 test/tree_test.rb