X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcondition.pure.lisp;h=cddc4be1227413119d980379093dd3f4ec0c6fc6;hb=9d36021d86b7db7561b2edc40324c8e5229f88b3;hp=d40cdbac73294504bc7682fa561609a9882c6027;hpb=15d6e7c9a2c3234f95dfe278046fa2fee1b0c007;p=sbcl.git diff --git a/tests/condition.pure.lisp b/tests/condition.pure.lisp index d40cdba..cddc4be 100644 --- a/tests/condition.pure.lisp +++ b/tests/condition.pure.lisp @@ -130,10 +130,24 @@ (multiple-value-bind (res err) (ignore-errors (apply #'error args)) (assert (not res)) - (assert (typep err 'type-error))))) + (assert (typep err 'type-error)) + (assert (not (nth-value 1 (ignore-errors + (type-error-datum err))))) + (assert (not (nth-value 1 (ignore-errors + (type-error-expected-type err)))))))) (test '#:no-such-condition) (test nil) (test t) (test 42) (test (make-instance 'standard-object))) +;;; If CERROR is given a condition, any remaining arguments are only +;;; used for the continue format control. +(let ((x 0)) + (handler-bind + ((simple-error (lambda (c) (incf x) (continue c)))) + (cerror "Continue from ~A at ~A" + (make-condition 'simple-error :format-control "foo" + :format-arguments nil) + 'cerror (get-universal-time)) + (assert (= x 1))))