diff options
Diffstat (limited to 'lib/pure/htmlgen.nim')
-rw-r--r-- | lib/pure/htmlgen.nim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/pure/htmlgen.nim b/lib/pure/htmlgen.nim index d712e53f3..e6c15371e 100644 --- a/lib/pure/htmlgen.nim +++ b/lib/pure/htmlgen.nim @@ -483,7 +483,8 @@ macro `var`*(e: expr): expr {.immediate.} = result = xmlCheckedTag(e, "var", commonAttr) when isMainModule: - var nim = "Nim" - echo h1(a(href="http://nim-lang.org", nim)) - echo form(action="test", `accept-charset` = "Content-Type") - + let nim = "Nim" + assert h1(a(href="http://nim-lang.org", nim)) == + """<h1><a href="http://nim-lang.org">Nim</a></h1>""" + assert form(action="test", `accept-charset` = "Content-Type") == + """<form action="test" accept-charset="Content-Type"></form>""" |