class TestWabisabiHtmlGeneratorModule
Public Instance Methods
ok(e, s)
click to toggle source
# File vendor/qwik/lib/qwik/wabisabi-generator.rb, line 239 def ok(e, s) assert_equal e, s.rb_format_xml(-1, -1) end
test_all()
click to toggle source
# File vendor/qwik/lib/qwik/wabisabi-generator.rb, line 243 def test_all html = html {[ head {[ contenttype("text/html; charset=SHIFT_JIS"), title {"タイトル"}, stylesheet('style.css') ]}, body {[ pre {[b {'world'}, 'hello']}, pre {['This is ', b{'bold'}, ' text.']}, pre {['This is ', i{'italic'}, ' text.']}, p {['This is ', a('hoge'){'anchor'}, ' text.']}, p {['This is ', a(:href=>'hoge'){'anchor'}, ' text.']}, img('new.gif', 'new') ]} ]} ok("<html><head><meta content=\"text/html; charset=SHIFT_JIS\" http-equiv=\"Content-Type\"/><title>タイトル</title><link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\"/></head><body><pre><b>world</b>hello</pre><pre>This is <b>bold</b> text.</pre><pre>This is <i>italic</i> text.</pre><p>This is <a href=\"hoge\">anchor</a> text.</p><p>This is <a href=\"hoge\">anchor</a> text.</p><img alt=\"new\" src=\"new.gif\"/></body></html>", html) end