Commit 78278de3 authored by david's avatar david

Revision: cxml--devel--1.0--patch-64

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Fri Feb  6 15:59:55 CET 2004
Standard-date: 2004-02-06 14:59:55 GMT
Modified-files: domtest.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-64
Summary: workaround: normalize documents explicitly

workaround: normalize documents explicitly
parent 7b1bfd46
......@@ -464,6 +464,8 @@
(bindings '())
(code '()))
(declare (ignore title))
;; XXX Muesste der Parser nicht ein normalisiertes Dokument liefern?
(dom:normalize test)
(do-child-elements (e test)
(string-case (dom:tag-name e)
("metadata"
......@@ -495,9 +497,13 @@
(defun load-file (name &optional will-be-modified-p)
(declare (ignore will-be-modified-p))
(let ((directory (merge-pathnames "tests/level1/core/files/" *directory*)))
(xml:parse-file
(make-pathname :name name :type "xml" :defaults directory))))
(let* ((directory (merge-pathnames "tests/level1/core/files/" *directory*))
(document
(xml:parse-file
(make-pathname :name name :type "xml" :defaults directory))))
;; XXX Muesste der Parser nicht ein normalisiertes Dokument liefern?
(dom:normalize (dom:document-element document))
document))
(defun test2 (&optional verbose)
(let* ((test-directory (merge-pathnames "tests/level1/core/" *directory*))
......@@ -519,11 +525,12 @@
(print lisp))
(when lisp
(incf ntried)
(handler-case
(funcall (compile nil lisp))
(serious-condition (c)
(incf nfailed)
(warn "test failed: ~A" c)))))
(with-simple-restart (skip-test "Skip this test")
(handler-case
(funcall (compile nil lisp))
(serious-condition (c)
(incf nfailed)
(warn "test failed: ~A" c))))))
(incf i)))
(format t "~&~D/~D tests failed; ~D test~:P were skipped"
nfailed ntried (- n ntried))))
......@@ -532,7 +539,8 @@
(let* ((test-directory (merge-pathnames "tests/level1/core/" *directory*))
(lisp (slurp-test (merge-pathnames href test-directory))))
(print lisp)
(funcall (compile nil lisp))))
(when lisp
(funcall (compile nil lisp)))))
#+(or)
(test "attrname")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment