diff options
author | kemifl <kemifl@gmail.com> | 2020-11-23 19:53:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 19:53:57 +0100 |
commit | a764a5b9bced8159d61647c42f6168a44453faff (patch) | |
tree | 763bd3e5dee699b4eaffa6ca5513bac4367a365e /tests | |
parent | 0c6c4be0e783893cc21352fa686fb18c158d3e43 (diff) | |
download | Nim-a764a5b9bced8159d61647c42f6168a44453faff.tar.gz |
fix #14056 (#16071)
fix #14056, incorporate review comments
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tmitems.nim | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/stdlib/tmitems.nim b/tests/stdlib/tmitems.nim index 17265e1f7..c0ced7cab 100644 --- a/tests/stdlib/tmitems.nim +++ b/tests/stdlib/tmitems.nim @@ -16,7 +16,18 @@ fpqeew <Students> <Student Name="Aprilfoo" /> <Student Name="bar" /> -</Students>''' +</Students> +<chapter> + <title>This is a Docbook title</title> + <para> + This is a Docbook paragraph containing <emphasis>emphasized</emphasis>, + <literal>literal</literal> and <replaceable>replaceable</replaceable> + text. Sometimes scrunched together like this: + <literal>literal</literal><replaceable>replaceable</replaceable> + and sometimes not: + <literal>literal</literal> <replaceable>replaceable</replaceable> + </para> +</chapter>''' """ block: @@ -123,7 +134,7 @@ block: x.num += 10 echo j -import xmltree, xmlparser, streams, strtabs +import xmltree, xmlparser, parsexml, streams, strtabs block: var d = parseXml(newStringStream """<Students> @@ -134,3 +145,17 @@ block: x = <>Student(Name=x.attrs["Name"] & "foo") d[1].attrs["Name"] = "bar" echo d + +block: + var d = parseXml(newStringStream """<chapter> + <title>This is a Docbook title</title> + <para> + This is a Docbook paragraph containing <emphasis>emphasized</emphasis>, + <literal>literal</literal> and <replaceable>replaceable</replaceable> + text. Sometimes scrunched together like this: + <literal>literal</literal><replaceable>replaceable</replaceable> + and sometimes not: + <literal>literal</literal> <replaceable>replaceable</replaceable> + </para> +</chapter>""",{reportComments, reportWhitespace}) + echo d |