Commit 860d36cf authored by pfdietz's avatar pfdietz

Wrapped IN-PACKAGE call in EVAL when I need to catch its error (in case the...

Wrapped IN-PACKAGE call in EVAL when I need to catch its error (in case the error is thrown at macro expansion time.
parent 219a9ae3
......@@ -10,45 +10,43 @@
;;; in-package
(deftest in-package-1
(let ((*package* *package*))
(declare (special *package*))
(let ((p2 (in-package "A")))
(and (eqt p2 (find-package "A"))
(eqt *package* p2))))
(let ((*package* *package*))
(declare (special *package*))
(let ((p2 (in-package "A")))
(and (eqt p2 (find-package "A"))
(eqt *package* p2))))
t)
(deftest in-package-2
(let ((*package* *package*))
(declare (special *package*))
(let ((p2 (in-package |A|)))
(and (eqt p2 (find-package "A"))
(eqt *package* p2))))
(let ((*package* *package*))
(declare (special *package*))
(let ((p2 (in-package |A|)))
(and (eqt p2 (find-package "A"))
(eqt *package* p2))))
t)
(deftest in-package-3
(let ((*package* *package*))
(declare (special *package*))
(let ((p2 (in-package :|A|)))
(and (eqt p2 (find-package "A"))
(eqt *package* p2))))
(let ((*package* *package*))
(declare (special *package*))
(let ((p2 (in-package :|A|)))
(and (eqt p2 (find-package "A"))
(eqt *package* p2))))
t)
(deftest in-package-4
(let ((*package* *package*))
(declare (special *package*))
(handler-case
(let ((p2 (in-package #\A)))
(and (eqt p2 (find-package "A"))
(eqt *package* p2)))
(error (c) c)))
(let ((*package* *package*))
(declare (special *package*))
(let ((p2 (in-package #\A)))
(and (eqt p2 (find-package "A"))
(eqt *package* p2))))
t)
(deftest in-package-5
(let ((*package* *package*))
(declare (special *package*))
(ignore-errors (delete-package "H"))
(handler-case
(in-package "H")
(package-error () 'package-error)
(error (c) c)))
(let ((*package* *package*))
(declare (special *package*))
(ignore-errors (delete-package "H"))
(handler-case
(eval '(in-package "H"))
(package-error () 'package-error)
(error (c) c)))
package-error)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment