X-Git-Url: https://dreyeck.freedombox.rocks/gitweb/topic-maps.git/blobdiff_plain/0eed7189a0cdd535c980c2160ae2065de21f5d93..d034a8deafa7cf74b2264ea8a7bd5cc0950806bf:/tests/xtm-identity.lisp diff --git a/tests/xtm-identity.lisp b/tests/xtm-identity.lisp index d3d2e71..84af015 100644 --- a/tests/xtm-identity.lisp +++ b/tests/xtm-identity.lisp @@ -12,6 +12,8 @@ (defvar *fixture* nil) (defvar *negative-outputs* nil) (defvar *negative-controls* nil) +(defvar *name-outputs* nil) +(defvar *name-controls* nil) (defun check (name truth) (push name *checks*) (unless truth (error "XTM test failed: ~A" name)) @@ -243,7 +245,7 @@ (dolist (spec (list (list "xml" "" 'xtm-xml-error :fail) (list "xtm" (document "") 'xtm-rejection :fail) (list "tmdm" (document "") 'item-identifier-error :fail) - (list "unsupported" (document "N") 'xtm-unsupported :unsupported))) + (list "unsupported" (document "N") 'xtm-unsupported :unsupported))) (let ((case (case-record)) (c (condition-from (lambda () (deserialize-octets (bytes (second spec)) :document-iri *document*))))) (record-original-result case nil #() c) @@ -408,7 +410,7 @@ "" "]>")) (rejection (concatenate 'string "doctype:" body) (concatenate 'string body (document "")) 'xtm-xml-error :doctype-forbidden)) - (dolist (spec '(("unsupported-name" "Name" :unsupported-construct) + (dolist (spec '(("unsupported-name-scope" "Name" :unsupported-construct) ("unsupported-occurrence" "v" :unsupported-construct) ("unsupported-association" "" :unsupported-construct) ("unsupported-mergemap" "" :unsupported-construct))) @@ -463,9 +465,10 @@ (setf *fixture* map))) (defun run-tests () - (setf *checks* nil *fixture* nil *negative-outputs* nil *negative-controls* nil) + (setf *checks* nil *fixture* nil *negative-outputs* nil *negative-controls* nil *name-outputs* nil *name-controls* nil) (handler-case - (progn (original-contracts) (negative-original-controls) (negative-original-contracts) (result-classification-tests) + (progn (original-contracts) (negative-original-controls) (negative-original-contracts) + (name-original-contracts) (name-tests) (result-classification-tests) (semantic-tests) (identity-cascade-tests) (negative-tests) (helper-source-test)) (error (condition) ;; Preserve the actual failed outcome before ASDF propagates the failure. @@ -484,7 +487,7 @@ (array (items) (coerce items 'vector))) (with-open-file (out pathname :direction :output :if-exists :supersede :external-format :utf-8) (topic-maps.test-foundation::emit-json-value - (fields "scope" "XTM 2.0 identity subset, 26 positive and seven cause-qualified negative original contracts; no CTM Mergemap integration" + (fields "scope" "XTM 2.0 identity subset, 36 positive and seven cause-qualified negative original contracts; no CTM Mergemap integration" "corpusCommit" "cd165b150176c1d6842b37be9cc9051b40d4996b" "statuses" (fields "pass" (count :pass cases :key #'topic-maps.test-foundation:test-case-status) "fail" (count :fail cases :key #'topic-maps.test-foundation:test-case-status) @@ -505,6 +508,8 @@ "ctmMergemapContract" "NOT-RUN; direct helper deserialization only") "negativeOriginals" (array *negative-outputs*) "negativeControls" (array *negative-controls*) + "nameOriginals" (array *name-outputs*) + "nameControls" (array *name-controls*) "actualAndExpected" (array (loop for (id actual expected model condition source-length) in *outputs* collect (fields "id" id "actual" (when actual (babel:octets-to-string actual :encoding :utf-8)) "expected" (babel:octets-to-string expected :encoding :utf-8) "byteLength" (when actual (length actual))