36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
;;; Regression tests for ERROR-RUNTIME patches
|
|
|
|
;; Patch 1.
|
|
|
|
(do-test "AR 7563: Default filter function for unnamed proceed cases"
|
|
(not (expect-errors (error)
|
|
(proceed-case (compute-proceed-cases) (nil nil :report "This one"))
|
|
))
|
|
)
|
|
|
|
(do-test-group ("AR 7564"
|
|
:before (progn (il:remprop 'foo 'il:%proceed-arg-collector)
|
|
(defun foo () '(1 2 3))))
|
|
(do-test "AR 7564: INVOKE-PROCEED-CASE v. defined functions"
|
|
(not (expect-errors (error)
|
|
(proceed-case (progn (invoke-proceed-case (find-proceed-case 'foo)) nil)
|
|
(foo () t))
|
|
))
|
|
)
|
|
)
|
|
|
|
;; Patch 2.
|
|
|
|
(do-test "ECASE report"
|
|
(macrolet ((capture-error-message (form)
|
|
`(condition-case ,form
|
|
(error (c) (write-to-string c :case :downcase :escape nil)))))
|
|
(and (equal (capture-error-message (ecase "foo" (x 1) (y 2)))
|
|
"\"foo\" is neither x nor y.")
|
|
(equal (capture-error-message (ecase (+ 1 2) (x 1) (y 2)))
|
|
"The value of (+ 1 2), 3,is neither x nor y.")
|
|
)
|
|
)
|
|
)
|
|
|