blob: 87accafb982361f7f21e78c2816f09ac9134ac26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
(defpackage :xfdf-test
(:use :cl
:1am
:xfdf)
; (:export #:run)
)
(in-package :xfdf-test)
; (defun run ()
; (1am:run))
(test generates-xfdf-xml
(let ((xfdf-string
(with-output-to-string (xfdf-stream)
(xfdf:write-xfdf
xfdf-stream
'(("checkbox-on" . T)
("checkbox-off" . nil)
("text" . "123 Fake Street, Springfield"))))))
(is (string=
xfdf-string
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<xfdf xmlns=\"http://ns.adobe.com/xfdf/\" xml:space=\"preserve\">
<fields>
<field name=\"checkbox-on\">
<value>Yes</value>
</field>
<field name=\"checkbox-off\">
<value>Off</value>
</field>
<field name=\"text\">
<value>123 Fake Street, Springfield</value>
</field>
</fields>
</xfdf>"))))
|