X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Freader.pure.lisp;h=d5407e4cb584bb70a6e952ec0f33de50db6247bf;hb=78eea0607fb44f620a8192e173f91860d3622967;hp=a127d313a4dfbc4d473dc1941fa08867bba28e1b;hpb=b2365f5ca2919ad48e1dbc7ac4e4e5b2063d16b7;p=sbcl.git diff --git a/tests/reader.pure.lisp b/tests/reader.pure.lisp index a127d31..d5407e4 100644 --- a/tests/reader.pure.lisp +++ b/tests/reader.pure.lisp @@ -254,4 +254,22 @@ (multiple-value-bind (reader-fn non-terminating-p) (get-macro-character #\" (copy-readtable nil)) (declare (ignore reader-fn)) - (assert (not non-terminating-p)))) \ No newline at end of file + (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))))) + +(with-test (:name set-syntax-from-char-dispatch-macro-char) + (let ((rt (copy-readtable))) + (make-dispatch-macro-character #\! nil rt) + (set-dispatch-macro-character #\! #\! (constantly 'bang^2) rt) + (flet ((maybe-bang () + (let ((*readtable* rt)) + (read-from-string "!!")))) + (assert (eq 'bang^2 (maybe-bang))) + (set-syntax-from-char #\! #\! rt) + (assert (eq '!! (maybe-bang))))))