1.0.46.43: fix sb-introspect on non-threaded builds
[sbcl.git] / tests / expect.sh
index 5919750..84617f0 100644 (file)
@@ -30,6 +30,19 @@ EOF
     check_status_maybe_lose load-into-interpreter $?
 }
 
+expect_clean_cload ()
+{
+    expect_clean_compile $1
+    run_sbcl <<EOF
+        (multiple-value-bind (value0 value1) 
+            (ignore-errors (load (compile-file-pathname "$1")))
+          (assert value0)
+          (assert (null value1)))
+        (sb-ext:quit :unix-status $EXIT_LISP_WIN)
+EOF
+    check_status_maybe_lose load-compiled $?
+}
+
 # Test that a file compiles cleanly, with no ERRORs, WARNINGs or
 # STYLE-WARNINGs.
 expect_clean_compile ()
@@ -86,24 +99,24 @@ EOF
     check_status_maybe_lose abort-compile $?
 }
 
-fail_on_compiler_note ()
+fail_on_condition_during_compile ()
 {
     run_sbcl <<EOF
-        (handler-bind ((sb-ext:compiler-note #'error))
-          (compile-file "$1")
+        (handler-bind (($1 #'error))
+          (compile-file "$2")
           (sb-ext:quit :unix-status $EXIT_LISP_WIN))
 EOF
-    check_status_maybe_lose fail-on-compiler-note $?
+    check_status_maybe_lose "fail-on-condition_$1" $?
 }
 
-expect_compiler_note ()
+expect_condition_during_compile ()
 {
     run_sbcl <<EOF
-        (handler-bind ((sb-ext:compiler-note (lambda (c)
-                                               (declare (ignore c))
-                                               (sb-ext:quit :unix-status
-                                                            $EXIT_LISP_WIN))))
-          (compile-file "$1"))
+        (handler-bind (($1 (lambda (c)
+                             (declare (ignore c))
+                             (sb-ext:quit :unix-status $EXIT_LISP_WIN))))
+          (compile-file "$2"))
 EOF
-    check_status_maybe_lose expect-compiler-note $?
+    check_status_maybe_lose "expect-condition_$1" $?
 }
+