class test markup text
import idealmachinechannelsstring writer
testcase test writer trivial()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatterwrite(base elementmake(text libraryP, "foo" !> base string))
assert "<p>\n foo\n</p>\n" == the writerelements()
testcase test quoted()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatterwrite("AT&T <etc.> q1:' q2:\"" !> base string)
assert "AT&amp;T &lt;etc.&gt; q1:&apos; q2:&quot;" == the writerelements()
testcase test writer indent()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatterwrite(base elementmake(text libraryP, "foo" !> base string))
the formatterwrite(base elementmake(text libraryINDENT, "bar" !> base string))
assert "<p>\n foo\n</p>\n<indent>\n bar\n</indent>\n" == the writerelements()
testcase test attribute()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatterwrite(base elementmake(text libraryP, text libraryNAME, "foo" !> base string, "bar" !> base string))
assert "<p name='foo'>\n bar\n</p>\n" == the writerelements()
testcase test self closing tag()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatterwrite("foo" !> base string)
the formatterwrite(base elementmake(text libraryBR, text libraryCLEAR, "all" !> base string, missinginstance))
the formatterwrite("bar\n" !> base string)
assert "foo<br clear='all' />\nbar\n" == the writerelements()
testcase test writer fragment()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the entity : text entity • new(text libraryIDEAL TEXT, "*", "middot")
the formatterwrite("one" !> base string)
the formatterwrite(the entity)
the formatterwrite("two" !> base string)
assert "one&middot;two" == the writerelements()