# test_structure.rb # 12. April 2007 # $:.unshift File.join(File.dirname(__FILE__),'..','lib') begin require "rubygems" require "clothred" rescue LoadError require "clothred" end require 'test/unit' class TestClothRedStructures < Test::Unit::TestCase STRUCTURE_TEST = [ ["
blockquote
","bq. blockquote"], ["

paragraph

another paragraph

", "paragraph\n\nanother paragraph\n\n"], ["HTML page break
", "HTML page break\n"], ["XHTML page break
", "XHTML page break\n"] ] def test_structures STRUCTURE_TEST.each do |html, textile| test_html = ClothRed.new(html) result = test_html.to_textile assert_equal(textile,result) end end end