(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>"))
- (check (concatenate 'string "diagnostic:unchanged-excluded-feature:" text)
- (typep (condition-from (lambda () (read-text text))) 'topic-maps.ctm:ctm-unsupported))))
+ (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 (if (search "%include" text) "diagnostic:Include-requires-explicit-resolver"
+ "diagnostic:triple-string-body-supported")
+ (if (search "%include" text)
+ (let ((c (condition-from (lambda () (read-text text)))))
+ (and (typep c 'topic-maps.ctm:ctm-unsupported)
+ (eq :resource-resolver-required (topic-maps.ctm:error-code c))))
+ (let* ((map (read-text (concatenate 'string text " f()")))
+ (name (first (topic-names (named map "a")))))
+ (and name (equal "N" (topic-name-value name)) (invariant map)))))))
(defun original-cases ()
(setf *observations* nil *rejections* nil)