diff options
| author | Stefan Kangas | 2023-12-22 23:41:36 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2023-12-23 01:31:26 +0100 |
| commit | bb5399e3cd75450db6db9b3c5829f7bd87ca1308 (patch) | |
| tree | 35f1539dc7087a74429a96de5999f49a64a2cdd1 /test | |
| parent | 9cb85e950dac77b59d48d320c7d40689d019aad4 (diff) | |
| download | emacs-bb5399e3cd75450db6db9b3c5829f7bd87ca1308.tar.gz emacs-bb5399e3cd75450db6db9b3c5829f7bd87ca1308.zip | |
Introduce new function lm-package-requires
* lisp/emacs-lisp/package.el (package--prepare-dependencies): Move
from here...
* lisp/emacs-lisp/lisp-mnt.el (lm--prepare-package-dependencies):
...to here.
(lm-package-requires): New function.
(package-buffer-info): Use above new function.
* test/lisp/emacs-lisp/lisp-mnt-tests.el
(lm--tests-lm-package-requires): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/lisp-mnt-tests.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/lisp-mnt-tests.el b/test/lisp/emacs-lisp/lisp-mnt-tests.el index c056761f0f9..1418abf221f 100644 --- a/test/lisp/emacs-lisp/lisp-mnt-tests.el +++ b/test/lisp/emacs-lisp/lisp-mnt-tests.el | |||
| @@ -30,6 +30,26 @@ | |||
| 30 | '(("Bob Weiner" . "rsw@gnu.org") | 30 | '(("Bob Weiner" . "rsw@gnu.org") |
| 31 | ("Mats Lidell" . "matsl@gnu.org"))))) | 31 | ("Mats Lidell" . "matsl@gnu.org"))))) |
| 32 | 32 | ||
| 33 | (ert-deftest lm--tests-lm-package-requires () | ||
| 34 | (with-temp-buffer | ||
| 35 | (insert ";; Package-Requires: ((emacs 29.1))") | ||
| 36 | (should (equal (lm-package-requires) '((emacs 29.1))))) | ||
| 37 | (with-temp-buffer | ||
| 38 | (insert ";; Package-Requires: ((emacs \"26.3\") (jsonrpc \"1.0.16\") (flymake \"1.2.1\") (project \"0.9.8\") (xref \"1.6.2\") (eldoc \"1.14.0\") (seq \"2.23\") (external-completion \"0.1\"))") | ||
| 39 | (should (equal (lm-package-requires) | ||
| 40 | '((emacs "26.3") (jsonrpc "1.0.16") (flymake "1.2.1") | ||
| 41 | (project "0.9.8") (xref "1.6.2") (eldoc "1.14.0") | ||
| 42 | (seq "2.23") (external-completion "0.1"))))) | ||
| 43 | (with-temp-buffer | ||
| 44 | (insert ";; Package-Requires: ((emacs \"26.3\") (jsonrpc \"1.0.16\") (flymake \"1.2.1\")\n" | ||
| 45 | ";; (project \"0.9.8\") (xref \"1.6.2\") (eldoc \"1.14.0\")\n" | ||
| 46 | ";; (seq \"2.23\") (external-completion \"0.1\"))") | ||
| 47 | (should (equal (lm-package-requires) | ||
| 48 | '((emacs "26.3") (jsonrpc "1.0.16") (flymake "1.2.1") | ||
| 49 | (project "0.9.8") (xref "1.6.2") (eldoc "1.14.0") | ||
| 50 | (seq "2.23") (external-completion "0.1")))))) | ||
| 51 | |||
| 52 | |||
| 33 | (ert-deftest lm--tests-lm-website () | 53 | (ert-deftest lm--tests-lm-website () |
| 34 | (with-temp-buffer | 54 | (with-temp-buffer |
| 35 | (insert ";; URL: https://example.org/foo") | 55 | (insert ";; URL: https://example.org/foo") |