class test markup text
import ideal • machine • channels • string writer
testcase test writer trivial()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatter • write(base element • make(text library • P, "foo" !> base string))
assert "<p>\n foo\n</p>\n" == the writer • elements()
testcase test quoted()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatter • write("AT&T <etc.> q1:' q2:\"" !> base string)
assert "AT&amp;T &lt;etc.&gt; q1:&apos; q2:&quot;" == the writer • elements()
testcase test writer indent()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatter • write(base element • make(text library • P, "foo" !> base string))
the formatter • write(base element • make(text library • INDENT, "bar" !> base string))
assert "<p>\n foo\n</p>\n<indent>\n bar\n</indent>\n" == the writer • elements()
testcase test attribute()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatter • write(base element • make(text library • P, text library • NAME, "foo" !> base string, "bar" !> base string))
assert "<p name='foo'>\n bar\n</p>\n" == the writer • elements()
testcase test self closing tag()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the formatter • write("foo" !> base string)
the formatter • write(base element • make(text library • BR, text library • CLEAR, "all" !> base string, missing • instance))
the formatter • write("bar\n" !> base string)
assert "foo<br clear='all' />\nbar\n" == the writer • elements()
testcase test writer fragment()
the writer : string writer • new()
the formatter : markup formatter • new(the writer)
the entity : text entity • new(text library • IDEAL TEXT, "*", "middot")
the formatter • write("one" !> base string)
the formatter • write(the entity)
the formatter • write("two" !> base string)
assert "one&middot;two" == the writer • elements()