class TestHTreeHtmlGeneratorModule
Public Instance Methods
test_html_generator_module()
click to toggle source
# File vendor/qwik/lib/qwik/htree-html-generator.rb, line 32 def test_html_generator_module 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_eq("<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 src=\"new.gif\" alt=\"new\"/></body></html>", html.format_xml) end