+ (define-alien-variable numberish int)
+ (define-alien-routine nummish int (x int))
+ (define-alien-variable "foo" int)
+ (define-alien-routine "bar" int)
+
+ (define-alien-routine "negative_short" short)
+ (define-alien-routine "negative_int" int)
+ (define-alien-routine "negative_long" long)
+
+ ;; compiling this gets us the FOP-FOREIGN-DATAREF-FIXUP on
+ ;; linkage-table ports
+ (defvar *extern* (extern-alien "negative_short" short))
+
+ ;; Test that loading an object file didn't screw up our records
+ ;; of variables visible in runtime. (This was a bug until
+ ;; Nikodemus Siivola's patch in sbcl-0.8.5.50.)
+ ;;
+ ;; This cannot be tested in a saved core, as there is no guarantee
+ ;; that the location will be the same.
+ (assert (= (sb-sys:sap-int (alien-sap *environ*))
+ (sb-sys:sap-int (alien-sap environ))))
+
+ (enable-debugger)
+ ;; automagic restarts
+ (setf *debugger-hook*
+ (lambda (condition hook)
+ (print (list :debugger-hook condition))
+ (let ((cont (find-restart 'continue condition)))
+ (when cont
+ (invoke-restart cont)))
+ (print :fell-through)
+ (invoke-debugger condition)))
+EOF
+
+# Test code
+cat > $testfilestem.test.lisp <<EOF