]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/ctm-prefixes.lisp
feat(ctm): support decimal occurrences and canonical lexical output
[topic-maps.git] / tests / ctm-prefixes.lisp
index 9c7b7fa33509819637884b6bd102ad8c93b93a07..8c030995f95f8030a4b7a0397796497d3d00c719 100644 (file)
            (state (map-state map)) (c (cxtm-condition (lambda () (cxtm map)))))
       (check (concatenate 'string "excluded-normalization-model-preserves:" name)
              (and (string= dt (topic-maps.tmdm:occurrence-datatype o)) (string= "00042" (topic-maps.tmdm:occurrence-value o))))
-      (check (concatenate 'string "excluded-normalization-explicit-cxtm-unsupported:" name)
-             (and (typep c 'topic-maps.cxtm:cxtm-unsupported) (eq :unsupported-occurrence-datatype (topic-maps.cxtm:error-code c)) (equal state (map-state map))))))
+      (if (member name '("integer" "decimal") :test #'string=)
+          (check (concatenate 'string name "-explicit-cxtm-now-supported")
+                 (and (null c) (search (if (string= name "integer") "<value>42</value>" "<value>42.0</value>")
+                                       (cxtm map)) (equal state (map-state map))))
+          (check (concatenate 'string "excluded-normalization-explicit-cxtm-unsupported:" name)
+                 (and (typep c 'topic-maps.cxtm:cxtm-unsupported) (eq :unsupported-occurrence-datatype (topic-maps.cxtm:error-code c)) (equal state (map-state map)))))))
   (let* ((map (read-text "%prefix xsd <http://www.w3.org/2001/XMLSchema#> a t:\"Same\"; t:\"Same\"^^xsd:string.")))
     (check "implicit-explicit-string-datatypes-have-identical-equality" (= 1 (length (all-occurrences map)))))
   (let* ((value (concatenate 'string "<&>" (map 'string #'code-char '(101 769))))