1.0.23.18: SET-[DISPATCH-]MACRO-CHARACTER fixes
[sbcl.git] / tests / reader.impure.lisp
index bb37bdf..02f202d 100644 (file)
   (funcall fun)
   (assert (equal '(:ok) (read-from-string "{:ok)"))))
 
+;;; THIS SHOULD BE LAST as it frobs the standard readtable
+(with-test (:name set-macro-character-nil)
+  (let ((fun (lambda (&rest args) 'ok)))
+    ;; NIL means the standard readtable.
+    (assert (eq t (set-macro-character #\~ fun nil nil)))
+    (assert (eq fun (get-macro-character #\~ nil)))
+    (assert (eq t (set-dispatch-macro-character #\# #\~ fun nil)))
+    (assert (eq fun (get-dispatch-macro-character #\# #\~ nil)))))
+
 ;;; success