aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-10-18 20:24:48 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-10-18 20:24:48 +0200
commit53a829e90f84728e8ce5c3bba58ce3449cdb073c (patch)
tree57e488bdd6c59363558764dcc7ea7a4505ddc8f9 /tests
parentFix spelling. (diff)
downloadcalp-53a829e90f84728e8ce5c3bba58ce3449cdb073c.tar.gz
calp-53a829e90f84728e8ce5c3bba58ce3449cdb073c.tar.xz
Change namespaced sxml to use new object system.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/sxml/sxml-namespaced.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/unit/sxml/sxml-namespaced.scm b/tests/unit/sxml/sxml-namespaced.scm
index b2d55028..52f86303 100644
--- a/tests/unit/sxml/sxml-namespaced.scm
+++ b/tests/unit/sxml/sxml-namespaced.scm
@@ -19,15 +19,15 @@
(test-group "XML constructor utility procedure"
(test-equal "3 args"
- (make-xml-element 'tagname 'namespace 'attributes)
- (xml 'namespace 'tagname 'attributes))
+ (xml-element tag: 'tagname ns: 'namespace attributes: '())
+ (xml 'namespace 'tagname '()))
(test-equal "2 args"
- (make-xml-element 'tagname 'namespace '())
+ (xml-element tag: 'tagname ns: 'namespace attributes: '())
(xml 'namespace 'tagname))
(test-equal "1 args"
- (make-xml-element 'tagname #f '())
+ (xml-element tag: 'tagname attributes: '())
(xml 'tagname)))
@@ -52,12 +52,12 @@
(xml->namespaced-sxml "<x:tag xmlns='ns1' xmlns:x='ns2'><tag/></x:tag>"))
(test-equal "PI are passed directly"
- `(*TOP* ,(make-pi-element 'xml "encoding=\"utf-8\" version=\"1.0\"")
+ `(*TOP* ,(pi-element 'xml "encoding=\"utf-8\" version=\"1.0\"")
(,(xml 'tag)))
(xml->namespaced-sxml "<?xml encoding=\"utf-8\" version=\"1.0\"?><tag/>"))
(test-equal "Document with whitespace in it"
- `(*TOP* ,(make-pi-element 'xml "")
+ `(*TOP* ,(pi-element 'xml "")
(,(xml 'root)
" "
(,(xml 'a))
@@ -67,7 +67,7 @@
;; TODO is this expected? xml->sxml discards it.
(test-equal "Whitespace before root is kept"
- `(*TOP* ,(make-pi-element 'xml "")
+ `(*TOP* ,(pi-element 'xml "")
(,(xml 'root)))
(xml->namespaced-sxml "<?xml?> <root/>")))
@@ -85,7 +85,7 @@
(sxml->namespaced-sxml '(x:a)
`((x . ,(ns 1)))))
(test-equal "With pi"
- `(*TOP* ,(make-pi-element 'xml "test")
+ `(*TOP* ,(pi-element 'xml "test")
(,(xml 'a)))
(sxml->namespaced-sxml
`(*TOP*
@@ -134,7 +134,7 @@
(lambda ()
(namespaced-sxml->sxml/namespaces
`(*TOP*
- ,(make-pi-element 'xml "test")
+ ,(pi-element 'xml "test")
(,(xml 'a)))))
(lambda (tree namespaces)
(test-equal '() namespaces)