]> dreyeck.freedombox.rocks Git - topic-maps.git/blobdiff - tests/ctm-templates.lisp
Implement CTM Mergemap with explicit byte resources and isolated environments
[topic-maps.git] / tests / ctm-templates.lisp
index 5e864962be23e514ce92b56c3ef82ece9a223074..ac37bdcff2153f19ab4f27a4933e0c20c2f643ef 100644 (file)
     (let ((c (condition-from (lambda () (read-text "def f() f() end f()")))))
       (check "diagnostic:resource-limit-is-UNSUPPORTED-not-normative-rejection"
              (and (eq (type-of c) 'topic-maps.ctm:ctm-unsupported) (eq :template-depth-limit (topic-maps.ctm:error-code c))))))
-  (dolist (text '("def f() a - \"\"\"N\"\"\". end" "%include <other>" "%mergemap <other> <urn:ctm>"))
+  (let ((condition (condition-from (lambda () (read-text "%mergemap <other> <urn:ctm>")))))
+    (check "diagnostic:unknown-mergemap-notation"
+           (and (typep condition 'topic-maps.ctm:ctm-rejection)
+                (eq :unknown-mergemap-notation (topic-maps.ctm:error-code condition)))))
+  (dolist (text '("def f() a - \"\"\"N\"\"\". end" "%include <other>"))
     (check (concatenate 'string "diagnostic:unchanged-excluded-feature:" text)
            (typep (condition-from (lambda () (read-text text))) 'topic-maps.ctm:ctm-unsupported))))