Bug #8602 » rexml-text-append-test.patch
test/rexml/test_core.rb | ||
---|---|---|
assert(REXML::Document.new('').children.empty?)
|
||
end
|
||
def test_element_add_text
|
||
doc = REXML::Document.new("<e/>")
|
||
doc.root.add_text("foo")
|
||
doc.to_s
|
||
doc.root.add_text(" bar")
|
||
assert_equal("<e>foo bar</e>", doc.root.to_s)
|
||
end
|
||
|
||
private
|
||
def attribute(name, value)
|
||
REXML::Attribute.new(name, value)
|
- « Previous
- 1
- 2
- Next »