1.0.45.31: make COPY-PPRINT-DISPATCH have access to a pristine table
[sbcl.git] / tests / condition.impure.lisp
index e21854c..4722d92 100644 (file)
                                              :stream *standard-input*)))
   ;; should be printable
   (dolist (c (list
-              ;; but not yet, o lord (should be fixed soon by WHN, in
-              ;; one or more commits ca. 1.0.9.55+, #+NILed out 'til
-              ;; then)
-              #+nil my-stream-error-1-0-9
-              #+nil parse-foo-error-1-0-9
-              ;; fixed, hallelujah
+              my-stream-error-1-0-9
+              parse-foo-error-1-0-9
               read-foo-error-1-0-9))
-    ;; escaped or not
+    ;; whether escaped or not
     (dolist (*print-escape* '(nil t))
       (write c :stream (make-string-output-stream)))))
+
+;;; Reported by Michael Weber: restart computation in :TEST-FUNCTION used to
+;;; cause infinite recursion.
+(defun restart-test-finds-restarts ()
+  (restart-bind
+      ((bar (lambda ()
+              (return-from restart-test-finds-restarts 42))
+         :test-function
+         (lambda (condition)
+           (find-restart 'qux))))
+    (when (find-restart 'bar)
+      (invoke-restart 'bar))))
+(assert (not (restart-test-finds-restarts)))