diff options
| author | Stefan Kangas | 2024-07-06 16:41:33 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2024-07-06 18:57:37 +0200 |
| commit | c302c5fab0c8dee12e7b19925452871ddb09c0b2 (patch) | |
| tree | ef20e450e001ccafd1476d2d8e19c43046d36c05 /test | |
| parent | 38ce85c547cac4023260be37f1b60af2c1f22d20 (diff) | |
| download | emacs-c302c5fab0c8dee12e7b19925452871ddb09c0b2.tar.gz emacs-c302c5fab0c8dee12e7b19925452871ddb09c0b2.zip | |
Add new function `lm-package-needs-footer-line`
* lisp/emacs-lisp/lisp-mnt.el (lm-package-needs-footer-line):
Factor out new function...
* lisp/emacs-lisp/package.el (package-buffer-info): ...from here.
* lisp/emacs-lisp/lisp-mnt.el (lm-verify): Use above new function.
* test/lisp/emacs-lisp/lisp-mnt-tests.el
(lm-tests--lm-package-needs-footer-line/empty-dependencies)
(lm-tests--lm-package-needs-footer-line/old-version)
(lm-tests--lm-package-needs-footer-line/new-version):
New tests.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/lisp-mnt-tests.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mnt-tests.el b/test/lisp/emacs-lisp/lisp-mnt-tests.el index e32480ada46..147062cba29 100644 --- a/test/lisp/emacs-lisp/lisp-mnt-tests.el +++ b/test/lisp/emacs-lisp/lisp-mnt-tests.el | |||
| @@ -49,6 +49,19 @@ | |||
| 49 | (project "0.9.8") (xref "1.6.2") (eldoc "1.14.0") | 49 | (project "0.9.8") (xref "1.6.2") (eldoc "1.14.0") |
| 50 | (seq "2.23") (external-completion "0.1")))))) | 50 | (seq "2.23") (external-completion "0.1")))))) |
| 51 | 51 | ||
| 52 | (ert-deftest lm-tests--lm-package-needs-footer-line/empty-dependencies () | ||
| 53 | (with-temp-buffer | ||
| 54 | (should (lm-package-needs-footer-line)))) | ||
| 55 | |||
| 56 | (ert-deftest lm-tests--lm-package-needs-footer-line/old-version () | ||
| 57 | (with-temp-buffer | ||
| 58 | (insert ";; Package-Requires: ((emacs \"29.1\"))\n") | ||
| 59 | (should (lm-package-needs-footer-line)))) | ||
| 60 | |||
| 61 | (ert-deftest lm-tests--lm-package-needs-footer-line/new-version () | ||
| 62 | (with-temp-buffer | ||
| 63 | (insert ";; Package-Requires: ((emacs \"30.1\"))\n") | ||
| 64 | (should (not (lm-package-needs-footer-line))))) | ||
| 52 | 65 | ||
| 53 | (ert-deftest lm--tests-lm-website () | 66 | (ert-deftest lm--tests-lm-website () |
| 54 | (with-temp-buffer | 67 | (with-temp-buffer |