semaphore notification objects
[sbcl.git] / tests / pprint.impure.lisp
index e59458f..038af4d 100644 (file)
                              (pprint-newline :mandatory s)))
                          n)))))
 
+(with-test (:name :can-restore-orig-pprint-dispatch-table)
+  (let* ((orig (pprint-dispatch 'some-symbol))
+         (alt (lambda (&rest args) (apply orig args))))
+    (set-pprint-dispatch 'symbol alt)
+    (assert (eq alt (pprint-dispatch 'some-symbol)))
+    (setf *print-pprint-dispatch* (copy-pprint-dispatch nil))
+    (assert (eq orig (pprint-dispatch 'some-symbol)))
+    (assert (not (eq alt orig)))))
+
 \f
 ;;; success