]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/ctm-identity.lisp
feat(ctm): read associations and roles with merge-safe topic references
[topic-maps.git] / tests / ctm-identity.lisp
index 6ff78a34f4cc9329cac749cb9fbccd1e8b477ab6..3b0ef340ec239533a751be953fa2b3b94a849669 100644 (file)
     (let ((condition (rejection (format nil "a.~%  ex:fake."))))
       (check "undefined-prefix-condition-class" (typep condition 'undefined-prefix))
       (check "error-line-column" (and (= 2 (error-line condition)) (= 3 (error-column condition)))))
-    (dolist (text '("a isa person." "relation(role: a)" "def tpl() a. end" "%prefix ex https://example.invalid/ ex:a."
+    (dolist (text '("a isa person." "def tpl() a. end" "%prefix ex https://example.invalid/ ex:a."
                     "? - \"anonymous\"." "a @theme." "a - \"name\" @theme." "a - \"\"\"triple\"\"\"."))
       (check (concatenate 'string "unsupported-not-silently-accepted:" text) (unsupported-p text)))
+    (check "association-now-deserialized"
+           (= 1 (length (topic-maps.tmdm:topic-map-associations (read-text "relation(role: a)")))))
     (check "empty-document-has-no-accidental-type-topic"
            (null (topic-map-topics (read-text ""))))
     (let ((map (deserialize-file (asdf:system-relative-pathname "topic-maps" "tests/fixtures/ctm/utf8-bom.ctm")