(assert (string= (lisp-implementation-version) "2.5.4"))
(assert (asdf:find-system "cxml" nil))
(asdf:load-system "cxml")
+(asdf:load-asd (merge-pathnames "../topic-maps.asd" *load-truename*))
+(asdf:load-system "topic-maps/xml")
(defpackage #:topic-maps.cxml-probe (:use #:cl))
(in-package #:topic-maps.cxml-probe)
(check name (typep condition class))
(format t "CXML-REJECTION ~A ~A~%" name (type-of condition))))
-(define-condition doctype-forbidden (error) ())
+(deftype doctype-forbidden () 'topic-maps.xml:doctype-forbidden)
(define-condition external-resource-forbidden (error)
((system-id :initarg :system-id :reader denied-system-id)))
(define-condition fallback-reached (error) ())
(defmethod sax:start-dtd ((handler observation) name public-id system-id)
(declare (ignore name public-id system-id))
- (unless (allow-doctype handler) (error 'doctype-forbidden)))
+ (unless (allow-doctype handler) (error 'topic-maps.xml:doctype-forbidden)))
(defun deny-external-resource (public-id system-id)
(declare (ignore public-id))
(error 'external-resource-forbidden :system-id system-id))
(defun parse-bytes (bytes &key resolver-probe)
+ (unless resolver-probe
+ (return-from parse-bytes
+ (topic-maps.xml:parse-octets bytes (make-instance 'observation))))
(let ((sax:*namespace-processing* t)
(sax:*include-xmlns-attributes* nil)
(cxml:*catalog* nil)
(check "exactly-one-fallback-only-in-nil-counterprobe" (= *fallback-calls* 1)))
(setf (fdefinition 'cxml::uri-to-pathname) original)))
+(load (merge-pathnames "cxml-encoding-regressions.lisp" *load-truename*))
+
(format t "CXML-SUMMARY ~D PASS ~D FAIL~%"
(- (length *checks*) (length *failed-checks*)) (length *failed-checks*))
(when *failed-checks* (uiop:quit 1))