Sha256: aab9cca6c744a5c71ff36823b1ed52db979356f57755049916090d0764c2694c

Contents?: true

Size: 812 Bytes

Versions: 9

Compression:

Stored size: 812 Bytes

Contents

# encoding: UTF-8

require 'trac-wiki'
require 'pp'
require 'bacon'

#class Bacon::Context
#end
describe 'TracWiki::Parser' do
 it 'should work' do 
   t = TracWiki::Tree.new
   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(:div)
   t.tag_end(:div)
   t.add('\bye')
   t.add_raw('>')
   t.add_raw(' ')
   t.add_raw('„')

   res =  "<div class=\"html\"><div id=\"JAN\"><div class=\"ahoj\" id=\"BHOJ\"></div>\n<br/>bye bye bye</div>\n</div>\n\\bye"
   res += "&gt;"
   #res += "\u00a0"
   #res += "„"
   res += '&nbsp;'
   res += '&bdquo;'

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trac-wiki-0.3.45 test/tree_test.rb
trac-wiki-0.3.44 test/tree_test.rb
trac-wiki-0.3.43 test/tree_test.rb
trac-wiki-0.3.42 test/tree_test.rb
trac-wiki-0.3.41 test/tree_test.rb
trac-wiki-0.3.40 test/tree_test.rb
trac-wiki-0.3.38 test/tree_test.rb
trac-wiki-0.3.37 test/tree_test.rb
trac-wiki-0.3.36 test/tree_test.rb