From: Stefan Kangas Date: Sat, 22 Oct 2022 09:48:20 +0000 (+0200) Subject: Add tests for packagep and package-name X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=940722fdfc2803caf0d05c509721ff8de99251cd;p=emacs.git Add tests for packagep and package-name * test/src/pkg-tests.el (pkg-tests-packagep) (pkg-tests-package-name): New tests. (pkg-tests-list-all-packages): Expand test. --- diff --git a/test/src/pkg-tests.el b/test/src/pkg-tests.el index aff6ff0eb51..b45ae4adcdc 100644 --- a/test/src/pkg-tests.el +++ b/test/src/pkg-tests.el @@ -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)) @@ -142,6 +146,9 @@ (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))