diff --git a/ansi-tests/apply.lsp b/ansi-tests/apply.lsp index bca498ee755f8be985b8cbdf6f81cd72b982ab08..b403ff7ad4cc913bbecbae85fc659dfb01bf4ae0 100644 --- a/ansi-tests/apply.lsp +++ b/ansi-tests/apply.lsp @@ -43,12 +43,15 @@ (apply 'cons '(a b)) (a . b)) -(deftest apply.6 - (let ((x 0) y z) +(deftest apply.order.1 + (let ((i 0) x y z) (values - (apply (progn (setf y (incf x)) - #'identity) - (progn (setf z (incf x)) + (apply (progn (setf x (incf i)) + #'list) + (progn (setf y (incf i)) + 'b) + (progn (setf z (incf i)) (list 'a))) - x y z)) - a 2 1 2) + i x y z)) + (b a) 3 1 2 3) + diff --git a/ansi-tests/cerror.lsp b/ansi-tests/cerror.lsp new file mode 100644 index 0000000000000000000000000000000000000000..c5df50bced01ef3de58c6956839e9b97c84c25fc --- /dev/null +++ b/ansi-tests/cerror.lsp @@ -0,0 +1,66 @@ +;-*- Mode: Lisp -*- +;;;; Author: Paul Dietz +;;;; Created: Sat Feb 15 19:45:27 2003 +;;;; Contains: Tests of CERROR + + +(in-package :cl-test) + +(deftest cerror.1 + (let ((fmt "Cerror")) + (handler-case (cerror "Keep going." fmt) + (simple-error (c) + (and + (null (simple-condition-format-arguments c)) + (eqt (simple-condition-format-control c) + fmt))))) + t) + +(deftest cerror.2 + (let* ((fmt "Cerror") + (cnd (make-condition 'simple-error :format-control fmt))) + (handler-case (cerror "Continue on." cnd) + (simple-error (c) + (and (eqt c cnd) + (eqt (simple-condition-format-control c) + fmt))))) + t) + +(deftest cerror.3 + (let ((fmt "Cerror")) + (handler-case (cerror "Continue" 'simple-error :format-control fmt) + (simple-error (c) + (eqt (simple-condition-format-control c) + fmt)))) + t) + +(deftest cerror.4 + (let ((fmt "Cerror: ~A")) + (handler-case (cerror "On on" fmt 10) + (simple-error (c) + (and + (equalt + (simple-condition-format-arguments c) + '(10)) + (eqt (simple-condition-format-control c) + fmt))))) + t) + +(deftest cerror.5 + (let ((fmt (formatter "Cerror"))) + (handler-case (cerror "Keep going." fmt) + (simple-error (c) + (and + (null (simple-condition-format-arguments c)) + (eqt (simple-condition-format-control c) + fmt))))) + t) + +;;; Continuing from a cerror + +(deftest cerror.6 + (handler-bind ((simple-error #'(lambda (c) (continue c)))) + (progn + (cerror "Wooo" 'simple-error) + 10)) + 10) diff --git a/ansi-tests/error.lsp b/ansi-tests/error.lsp index b83749902fbfba6f350305c945b701daf544ea79..7e5c0e0d801f2abd8ffd4d7a3c67d97d47d8330d 100644 --- a/ansi-tests/error.lsp +++ b/ansi-tests/error.lsp @@ -9,8 +9,10 @@ (let ((fmt "Error")) (handler-case (error fmt) (simple-error (c) - (eqt (simple-condition-format-control c) - fmt)))) + (and + (null (simple-condition-format-arguments c)) + (eqt (simple-condition-format-control c) + fmt))))) t) (deftest error.2 @@ -31,5 +33,26 @@ fmt)))) t) +(deftest error.4 + (let ((fmt "Error: ~A")) + (handler-case (error fmt 10) + (simple-error (c) + (and + (equalt + (simple-condition-format-arguments c) + '(10)) + (eqt (simple-condition-format-control c) + fmt))))) + t) + +(deftest error.5 + (let ((fmt (formatter "Error"))) + (handler-case (error fmt) + (simple-error (c) + (and + (null (simple-condition-format-arguments c)) + (eqt (simple-condition-format-control c) + fmt))))) + t) diff --git a/ansi-tests/gclload2.lsp b/ansi-tests/gclload2.lsp index 3efe7d53cb4d94c3a74ead357c5e3b828a873edd..3730134d4296dc92c27c6df014f67cf68509b850 100644 --- a/ansi-tests/gclload2.lsp +++ b/ansi-tests/gclload2.lsp @@ -109,6 +109,7 @@ (load "cell-error-name.lsp") (load "assert.lsp") (load "error.lsp") +(load "cerror.lsp") ;;; Tests of conses