Thảo luận Mô đun:HtmlBuilder/testcases

Nội dung trang không được hỗ trợ ở ngôn ngữ khác.
Bách khoa toàn thư mở Wikipedia

All tests passed.

test_all
Văn bản Mong đợi Thực tế
☑Y Empty builder
☑Y Plain text foo foo
☑Y Empty div <div></div> <div></div>
☑Y Div with text <div>foo</div> <div>foo</div>
☑Y Text and div foo<div>bar</div> foo<div>bar</div>
☑Y Nested div <div><div>foo</div></div> <div><div>foo</div></div>
☑Y Div with attribute <div id="foo"></div> <div id="foo"></div>
☑Y Div with multiple attributes <div id="foo" class="bar baz" lang="es"></div> <div id="foo" class="bar baz" lang="es"></div>
☑Y Div with multiple attributes in other order <div class="bar baz" id="foo" lang="es"></div> <div class="bar baz" id="foo" lang="es"></div>
☑Y Div with overwritten attribute <div id="baz" class="bar"></div> <div id="baz" class="bar"></div>
☑Y Div with overwritten attribute in other order <div class="bar" id="baz"></div> <div class="bar" id="baz"></div>
☑Y Div with attributes and text <div id="foo">bar</div> <div id="foo">bar</div>
☑Y Div with style <div style="background:red;"></div> <div style="background:red;"></div>
☑Y Div with multiple styles <div style="background:red;color:blue;"></div> <div style="background:red;color:blue;"></div>
☑Y Div with multiple styles in other order <div style="color:blue;background:red;"></div> <div style="color:blue;background:red;"></div>
☑Y Div with overwritten style <div style="background:green;color:blue;"></div> <div style="background:green;color:blue;"></div>
☑Y Div with CSS text <div style="width:55px;height:77px;;"></div> <div style="width:55px;height:77px;;"></div>
☑Y Div with explicitly overwritten style attribute <div style="color:blue;;"></div> <div style="color:blue;;"></div>
☑Y addClass <div class="foo"></div> <div class="foo"></div>
☑Y addClass with multiple classes <div class="foo bar baz"></div> <div class="foo bar baz"></div>
☑Y Unclosed div <div> <div>
☑Y Closing div tag </div> </div>
☑Y Self-closing br tag <br /> <br />
☑Y Ignored CSS values <div></div> <div></div>
☑Y Ignored attribute values <div></div> <div></div>
☑Y Empty CSS values <div></div> <div></div>
☑Y Two nodes <b></b><i></i> <b></b><i></i>
☑Y Two complicated nodes <div><b class="foo">bar</b>qux<i id="baz" style="color:yellow;"></i></div> <div><b class="foo">bar</b>qux<i id="baz" style="color:yellow;"></i></div>