diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/sxml/sxml-namespaced-util.scm | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/tests/unit/sxml/sxml-namespaced-util.scm b/tests/unit/sxml/sxml-namespaced-util.scm index 6f48105f..bc29e21d 100644 --- a/tests/unit/sxml/sxml-namespaced-util.scm +++ b/tests/unit/sxml/sxml-namespaced-util.scm @@ -7,36 +7,30 @@ (test-equal "XML Hash key" (cons 'a ns) - (xml-element-hash-key (xml 'a ns))) + (xml-element-hash-key ((xml 'a ns)))) (test-group "Find element" - (let ((el `(,(xml ns 'a)))) + (let ((el ((xml ns 'a)))) (test-eq "Found element is the source element" el - (find-element - (car el) - `((,(xml ns 'b)) ,el (,(xml ns 'a)))))) + (find-child + el + (xml-element-children + ((xml ns 'b) + el ((xml ns 'a))))))) ;; TODO Test "find" failure ) (test-group "Element Match" (test-assert "Positive element match" - (element-matches? (xml 'a ns) - (list (xml 'a ns) - "Content here"))) + (element-matches? ((xml 'a ns)) + (list + ((xml 'a ns) + "Content here")))) (test-assert "Negative element match" - (not (element-matches? (xml 'a ns) - (list (xml 'b ns) - "Content here"))))) - -(let ((el `(,(xml 'a) "Content"))) - (test-group "root-element" - (test-equal "With PI" - el (root-element `(*TOP* ,(pi-element 'doctype "HTML") ,el))) - (test-equal "Without PI" - el (root-element `(*TOP* ,el))) - - (test-equal "Bare" - el (root-element el)))) + (not (element-matches? ((xml 'a ns)) + (list + ((xml 'b ns) + "Content here")))))) '((sxml namespaced util)) |