1.0.15.36: fix bug 423
[sbcl.git] / tests / compiler.test.sh
index daa3fff..48aa64e 100644 (file)
@@ -13,9 +13,9 @@
 
 . ./expect.sh
 
-base_tmpfilename="compiler-test-$$-tmp"
-tmpfilename="$base_tmpfilename.lisp"
-compiled_tmpfilename="$base_tmpfilename.fasl"
+use_test_subdirectory
+
+tmpfilename="$TEST_FILESTEM.lisp"
 
 # This should fail, as type inference should show that the call to FOO
 # will return something of the wrong type.
@@ -355,8 +355,29 @@ cat > $tmpfilename <<EOF
 EOF
 expect_clean_compile $tmpfilename
 
-rm $tmpfilename
-rm $compiled_tmpfilename
+cat > $tmpfilename <<EOF
+(defstruct foo
+  (bar #p"/tmp/"))
+EOF
+expect_clean_compile $tmpfilename
+
+cat > $tmpfilename <<EOF
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (defstruct foox)
+  (defmethod make-load-form ((foo foox) &optional env)
+    (declare (ignore env))
+    '(make-foox)))
+(defstruct bar
+  (foo #.(make-foox)))
+EOF
+expect_clean_compile $tmpfilename
+
+cat > $tmpfilename <<EOF
+(defun something (x) x)
+...
+(defun something-more (x) x)
+EOF
+expect_aborted_compile $tmpfilename
 
 # success
-exit 104
+exit $EXIT_TEST_WIN