X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Freader.impure.lisp;h=01fcace842e9d2112be0bb210326e75178f903fc;hb=5c52e958cbff33e64084bc165813c90ca0e39085;hp=81167f0654b3be2ef6f87b4e336850dd7bcca1bc;hpb=faf3b69d1062a987aa18d83459f60c4c8a8d0987;p=sbcl.git diff --git a/tests/reader.impure.lisp b/tests/reader.impure.lisp index 81167f0..01fcace 100644 --- a/tests/reader.impure.lisp +++ b/tests/reader.impure.lisp @@ -155,6 +155,16 @@ (test (make-dispatch-macro-character #\! t srt)) (test (set-dispatch-macro-character #\# #\a (constantly t) srt) 'set-dispatch-macro-character)))))) +(with-test (:name :reader-package-errors) + (flet ((test (string) + (handler-case + (progn (read-from-string string) :feh) + (error (e) + (when (and (typep e 'reader-error) (typep e 'package-error)) + (package-error-package e)))))) + (assert (equal "NO-SUCH-PKG" (test "no-such-pkg::foo"))) + (assert (eq (find-package :cl) (test "cl:no-such-sym"))))) + ;;; THIS SHOULD BE LAST as it frobs the standard readtable (with-test (:name set-macro-character-nil) (handler-bind ((sb-int:standard-readtable-modified-error #'continue))