diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/txmltree.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/stdlib/txmltree.nim b/tests/stdlib/txmltree.nim index 4362f5ec3..c87871544 100644 --- a/tests/stdlib/txmltree.nim +++ b/tests/stdlib/txmltree.nim @@ -99,3 +99,18 @@ block: # bug #21290 doAssert s == """<foo> <bar>Hola<qux> <plugh /> </qux></bar> </foo>""" + +block: #21541 + let root = <>root() + root.add <>child(newText("hello")) + root.add <>more(newVerbatimText("hola")) + let s = $root + doAssert s == """<root> + <child>hello</child> + <more>hola</more> +</root>""" + + let temp = newVerbatimText("Hello!") + doAssert temp.text == "Hello!" + temp.text = "Hola!" + doAssert temp.text == "Hola!" |