]> git.eshelyaron.com Git - emacs.git/commitdiff
Add tests for packagep and package-name
authorStefan Kangas <stefankangas@gmail.com>
Sat, 22 Oct 2022 09:48:20 +0000 (11:48 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sat, 22 Oct 2022 09:48:20 +0000 (11:48 +0200)
* test/src/pkg-tests.el (pkg-tests-packagep)
(pkg-tests-package-name): New tests.
(pkg-tests-list-all-packages): Expand test.

test/src/pkg-tests.el

index aff6ff0eb519d4953c8803264e7e4aef13e74d9d..b45ae4adcdc5fe54f227ce5fd03392c6a5f6f836 100644 (file)
@@ -50,6 +50,9 @@
   (should-error (make-package "x" :use))
   (should-error (make-package "x" :use 1)))
 
+(ert-deftest pkg-tests-packagep ()
+  (packagep (make-package "x")))
+
 (ert-deftest pkg-tests-standard-packages ()
   (should (packagep (find-package "emacs")))
   (should (packagep (find-package "keyword")))
@@ -73,6 +76,7 @@
   (should nil))
 
 (ert-deftest pkg-tests-list-all-packages ()
+  (should (seq-every-p #'packagep (list-all-packages)))
   (with-packages (x y z)
     (let ((all (list-all-packages)))
       (should (member x all))
         (should-not (find-symbol "foo")))
     (cl-unintern 'foo)))
 
+(ert-deftest pkg-tests-package-name ()
+  (should (equal (package-name "emacs") "emacs")))
+
 (ert-deftest pkg-tests-export ()
   (should nil))