]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/ctm-typed-names.lisp
Implement general TMDM item identifiers and canonical output
[topic-maps.git] / tests / ctm-typed-names.lisp
index 1cb519c0091627c2f4e819e48133cd29d9f8b673..90123d53104fa2fa5e43c4d32b9d68f59ddf1e0f 100644 (file)
                                                  (if separator :expected-name-type-separator :expected-name-value)))
                   (= position (error-position condition)) (= 1 (error-line condition))
                   (= (1+ position) (error-column condition))))))
-  (dolist (text '("a - [-\"fullname\"]:\"Name\"." "a - type:\"Name\" @theme."
-                  "a - type:\"Name\" ~reifier." "a - type:\"Name\" (\"variant\" @theme)."))
+  (let* ((map (read-text "a - type:\"Name\" @theme.")) (name (first (topic-names (local-topic map "a")))))
+    (check "typed-reader:scope-now-supported"
+           (and (eq (local-topic map "type") (topic-name-type name))
+                (equal (list (local-topic map "theme")) (topic-maps.tmdm:topic-name-scope name)))))
+  (dolist (text '("a - [-\"fullname\" ~r]:\"Name\"."
+                  "a - type:\"Name\" ~reifier." "a - type:\"Name\" (\"variant\" @theme ~r)."))
     (check (concatenate 'string "typed-reader:excluded-feature:" text) (typep (ctm-condition text) 'ctm-unsupported))))
 
 (defun typed-name-order-tests ()