X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fpackages.impure.lisp;h=96431a5dd8a992ca380deb83adfa1463fb449a37;hb=3f47602cbbfdb31c59252008b5f2dbe91ca43d7f;hp=b2421b29570bde133adaad2710a60c64ac4958a5;hpb=b400484e0aa71c263c456fe7c85f80ed5661bff1;p=sbcl.git diff --git a/tests/packages.impure.lisp b/tests/packages.impure.lisp index b2421b2..96431a5 100644 --- a/tests/packages.impure.lisp +++ b/tests/packages.impure.lisp @@ -17,6 +17,11 @@ (assert (eq *foo* (find-package ""))) (assert (delete-package "")) +(make-package "BAR") +(defvar *baz* (rename-package "BAR" "BAZ")) +(assert (eq *baz* (find-package "BAZ"))) +(assert (delete-package *baz*)) + (handler-case (export :foo) (package-error (c) (princ c)) @@ -245,6 +250,17 @@ if a restart was invoked." (is (eql 1 (length conflict-sets))) (is (eql 3 (length (first conflict-sets))))))) +;;; Make sure that resolving a name-conflict in IMPORT doesn't leave +;;; multiple symbols of the same name in the package (this particular +;;; scenario found in 1.0.38.9, but clearly a longstanding issue). +(with-test (:name import-conflict-resolution) + (with-packages (("FOO" (:export "NIL")) + ("BAR" (:use))) + (with-name-conflict-resolution ((sym "FOO" "NIL")) + (import (list 'CL:NIL (sym "FOO" "NIL")) "BAR")) + (do-symbols (sym "BAR") + (assert (eq sym (sym "FOO" "NIL")))))) + ;;; UNINTERN (with-test (:name unintern.1) (with-packages (("FOO" (:export "SYM")) @@ -256,6 +272,11 @@ if a restart was invoked." (is (eq (sym "FOO" "SYM") (sym "BAZ" "SYM")))))) +(with-test (:name unintern.2) + (with-packages (("FOO" (:intern "SYM"))) + (unintern :sym "FOO") + (assert (find-symbol "SYM" "FOO")))) + ;;; WITH-PACKAGE-ITERATOR error signalling had problems (with-test (:name with-package-itarator.error) (assert (eq :good @@ -269,8 +290,7 @@ if a restart was invoked." :good))))) ;;; MAKE-PACKAGE error in another thread blocking FIND-PACKAGE & FIND-SYMBOL -#+sb-thread -(with-test (:name :bug-511072) +(with-test (:name :bug-511072 :skipped-on '(not :sb-thread)) (let* ((p (make-package :bug-511072)) (sem (sb-thread:make-semaphore)) (t2 (sb-thread:make-thread (lambda ()