From: Gerd Möllmann Date: Fri, 28 Oct 2022 06:19:20 +0000 (+0200) Subject: Add a test X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a94690e6b54c44546271f894fb6f0601276213c5;p=emacs.git Add a test * test/src/pkg-tests.el (pkg-tests-*package*): Test that *package* cannot be bound to a non-package. --- diff --git a/test/src/pkg-tests.el b/test/src/pkg-tests.el index bf85c710cf4..819a74dae65 100644 --- a/test/src/pkg-tests.el +++ b/test/src/pkg-tests.el @@ -46,6 +46,12 @@ (should (not (packagep "emacs"))) (should (not (packagep nil)))) +(ert-deftest pkg-tests-*package* () + (should (eq (let ((*package* (find-package "emacs"))) 'good) 'good)) + (should-error (let ((*package* :emacs)) nil)) + (should-error (let ((*package* 1)))) + (should-error (setq *package* :keyword))) + (ert-deftest pkg-tests-standard-packages () (should (packagep (find-package "emacs"))) (should (packagep (find-package 'emacs)))