1.0.43.29: fix OVERAGER-CHARACTER-BUFFERING test-case
[sbcl.git] / tests / interface.pure.lisp
index df8ee36..81a987b 100644 (file)
 (assert (not (special-operator-p 'declare)))
 
 ;;; WITH-TIMEOUT should accept more than one form in its body.
-(handler-bind ((sb-ext:timeout #'continue))
-  (sb-ext:with-timeout 3
-    (sleep 2)
-    (sleep 2)))
+(with-test (:name :with-timeout-forms)
+  (handler-bind ((sb-ext:timeout #'continue))
+    (sb-ext:with-timeout 3
+      (sleep 2)
+      (sleep 2))))
+
+;;; SLEEP should work with large integers as well -- no timers
+;;; on win32, so don't test there.
+#-win32
+(with-test (:name (sleep pretty-much-forever))
+  (assert (eq :timeout
+              (handler-case
+                  (sb-ext:with-timeout 1
+                    (sleep (ash 1 (* 2 sb-vm:n-word-bits))))
+                (sb-ext:timeout ()
+                  :timeout)))))
 
 ;;; DOCUMENTATION should return nil, not signal slot-unbound
 (documentation 'fixnum 'type)