4 (equal (xmlgen-extract-plist '(h1 :class "big" "A Title"))
5 '((h1 "A Title") (:class "big")))
6 (equal (xmlgen-extract-plist '(hello :big "world"))
7 '((hello) (:big "world")))
8 (equal (xmlgen-extract-plist '(big :one 1 :two 2 :three 3))
9 '((big) (:one 1 :two 2 :three 3))
10 "Slightly bigger plist")
11 (error (xmlgen-extract-plist '(hello "world" :how))
12 "Error thrown when plist is wrong size"))
13 ("xmlgen-attr-to-string"
14 (equal (xmlgen-attr-to-string '(:one "1" :two "2")) " one=\"1\" two=\"2\""))
15 ("xmlgen-string-escape"
16 (equal "This & this" (xmlgen-string-escape "This & this"))
17 (equal "This <&> this" (xmlgen-string-escape "This <&> this")))
19 (equal (xmlgen '(p "this & this")) "<p>this & this</p>")
20 (equal (xmlgen '(p :class "big")) "<p class=\"big\"/>")
21 (equal (xmlgen '(p :class "big" "hi")) "<p class=\"big\">hi</p>")
22 (equal (xmlgen '(h1)) "<h1/>")
23 (equal (xmlgen '(h1 "Title")) "<h1>Title</h1>")
24 (equal (xmlgen '(h1 :class "something" "hi"))
25 "<h1 class=\"something\">hi</h1>")
26 (equal (xmlgen '(p "hello" "again")) "<p>helloagain</p>")
32 (meta :something "hi"))))
33 (concat "<html><head><title>hello</title><meta something=\"hi\"/></head></html>"))))))