From a94690e6b54c44546271f894fb6f0601276213c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Fri, 28 Oct 2022 08:19:20 +0200 Subject: [PATCH] Add a test * test/src/pkg-tests.el (pkg-tests-*package*): Test that *package* cannot be bound to a non-package. --- test/src/pkg-tests.el | 6 ++++++ 1 file changed, 6 insertions(+) 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))) -- 2.39.2