emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/pkg a94690e6b5: Add a test


From: Gerd Moellmann
Subject: feature/pkg a94690e6b5: Add a test
Date: Fri, 28 Oct 2022 02:20:05 -0400 (EDT)

branch: feature/pkg
commit a94690e6b54c44546271f894fb6f0601276213c5
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    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 bf85c710cf..819a74dae6 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]