diff options
author | Stephane Fontaine <stefont@gmail.com> | 2016-07-28 20:25:12 +0400 |
---|---|---|
committer | Stephane Fontaine <stefont@gmail.com> | 2016-07-28 20:25:12 +0400 |
commit | 48867b2541d561a85daf54f2e62f6b765b22ea5d (patch) | |
tree | 32844d737f86246123ff8f6e4b1cc3746fee2fe7 /tests/stdlib | |
parent | fa537ee3a480823a251ca4fdf5442d2afe7a5afe (diff) | |
download | Nim-48867b2541d561a85daf54f2e62f6b765b22ea5d.tar.gz |
Update htmlparser test ``output`` variable
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/thtmlparser2814.nim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/stdlib/thtmlparser2814.nim b/tests/stdlib/thtmlparser2814.nim index 74c1a9556..968d390f1 100644 --- a/tests/stdlib/thtmlparser2814.nim +++ b/tests/stdlib/thtmlparser2814.nim @@ -1,5 +1,5 @@ discard """ - output: "@[]" + output: true """ import htmlparser import xmltree @@ -24,6 +24,7 @@ from streams import newStringStream ## </li> ## </ul> + for ltype in [["dl","dd"], ["ul","li"]]: let desc_item = if ltype[0]=="dl": "<dt>this</dt>" else: "" let item = "$1<$2><p>that</p></$2>" % [desc_item, ltype[1]] @@ -35,4 +36,9 @@ for ltype in [["dl","dd"], ["ul","li"]]: let parseH = parseHtml(newStringStream(list),"statichtml", errors =errors) - echo $parseH.findAll(ltype[1])[0].child("p") == "<p>that</p>" + if $parseH.findAll(ltype[1])[0].child("p") != "<p>that</p>": + echo "case " & ltype[0] & " failed !" + quit(2) + + +echo "true" |