1.0.43.29: fix OVERAGER-CHARACTER-BUFFERING test-case
[sbcl.git] / tests / reader.pure.lisp
index 62bd000..f0ba954 100644 (file)
 (let ((*readtable* (copy-readtable)))
   (set-syntax-from-char #\7 #\Space)
   (assert (string= (format nil "~7D" 1) "      1")))
+
+(let ((symbol (find-symbol "DOES-NOT-EXIST" "CL-USER")))
+  (assert (null symbol))
+  (handler-case
+      (read-from-string "CL-USER:DOES-NOT-EXIST")
+    (reader-error (c)
+      (princ c))))
+
+;;; The GET-MACRO-CHARACTER in SBCL <= "1.0.34.2" bogusly computed its
+;;; second return value relative to *READTABLE* rather than the passed
+;;; readtable.
+(let* ((*readtable* (copy-readtable nil)))
+  (set-syntax-from-char #\" #\A)
+  (multiple-value-bind (reader-fn non-terminating-p)
+      (get-macro-character #\" (copy-readtable nil))
+    (declare (ignore reader-fn))
+    (assert (not non-terminating-p))))
+
+(with-test (:name :bug-309093)
+  (assert (eq :error
+              (handler-case
+                  (read-from-string "`#2A((,(1+ 0) 0) (0 0))")
+                (reader-error ()
+                  :error)))))