Test for Sourceforge bug #286: miscompilation of (read-from-string).
authorPhilipp Marek <philipp@marek.priv.at>
Sun, 2 Mar 2014 19:09:02 +0000 (20:09 +0100)
committerPhilipp Marek <philipp@marek.priv.at>
Sun, 2 Mar 2014 19:09:02 +0000 (20:09 +0100)
src/tests/bugs/doit.lsp
src/tests/bugs/sf286.lsp [new file with mode: 0644]

index cbbbb21..a9f071c 100644 (file)
@@ -30,6 +30,7 @@
 (load "../ansi-tests/ansi-aux.lsp")
 
 (load "sf276--write-hash-readably.lsp")
+(load "sf286.lsp")
 (load "cl-001.lsp")
 
 (load "int-001.lsp")
diff --git a/src/tests/bugs/sf286.lsp b/src/tests/bugs/sf286.lsp
new file mode 100644 (file)
index 0000000..f80c68c
--- /dev/null
@@ -0,0 +1,17 @@
+
+;; miscompilation - assumed that read-from-string returns a fixnum.
+
+(deftest sf286-a
+         (assert
+           (let ((string ":cl-user"))
+             (find-package 
+               (let ((*package* *swank-io-package*))
+                 (read-from-string string))))))
+
+(deftest sf286-b
+         (assert
+           (let ((string ":cl-user"))
+             (let ((*package* *swank-io-package*))
+               (find-package 
+                 (read-from-string string)))))
+