[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature/pkg 940722fdfc: Add tests for packagep and package-name
From: |
Philip Kaludercic |
Subject: |
Re: feature/pkg 940722fdfc: Add tests for packagep and package-name |
Date: |
Sat, 22 Oct 2022 10:16:28 +0000 |
Stefan Kangas <stefankangas@gmail.com> writes:
> branch: feature/pkg
> commit 940722fdfc2803caf0d05c509721ff8de99251cd
> Author: Stefan Kangas <stefankangas@gmail.com>
> Commit: Stefan Kangas <stefankangas@gmail.com>
>
> 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.
> ---
> test/src/pkg-tests.el | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/test/src/pkg-tests.el b/test/src/pkg-tests.el
> index aff6ff0eb5..b45ae4adcd 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)))
I haven't taken a look at the branch yet, but I do fear that
`list-all-packages' might easily be confused with the unrelated
`list-packages'. Is there any way to avoid this terminological
conflict?
> (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))
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: feature/pkg 940722fdfc: Add tests for packagep and package-name,
Philip Kaludercic <=