diff options
| author | Stephen Leake | 2018-12-13 14:45:05 -0800 |
|---|---|---|
| committer | Stephen Leake | 2018-12-13 14:45:05 -0800 |
| commit | d4fb2690702fbd348977fc94a9f7a99c00cc3010 (patch) | |
| tree | a55fa60e7401455bb75c91c21b2f7540dd5488f4 /test | |
| parent | 87bef630bf0f45e8da74e43ba614aa2292b296ef (diff) | |
| download | emacs-d4fb2690702fbd348977fc94a9f7a99c00cc3010.tar.gz emacs-d4fb2690702fbd348977fc94a9f7a99c00cc3010.zip | |
Get long package description for installed packages from installed files
* doc/lispref/package.texi (Archive Web Server): New; document web
server interface.
* lisp/emacs-lisp/package.el (package--get-description): New; get long
description from installed files.
(describe-package-1): Use it, improve comments. No longer writing
NAME-readme.txt.
* test/lisp/emacs-lisp/package-tests.el:
(package-test-describe-package): There is now a description for an
installed package.
(package-test-describe-installed-multi-file-package): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/package-tests.el | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index f08bc92ff2a..17431f31f85 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el | |||
| @@ -435,11 +435,24 @@ Must called from within a `tar-mode' buffer." | |||
| 435 | (save-excursion (should (search-forward "Summary: A single-file package with no dependencies" nil t))) | 435 | (save-excursion (should (search-forward "Summary: A single-file package with no dependencies" nil t))) |
| 436 | (save-excursion (should (search-forward "Homepage: http://doodles.au" nil t))) | 436 | (save-excursion (should (search-forward "Homepage: http://doodles.au" nil t))) |
| 437 | (save-excursion (should (re-search-forward "Keywords: \\[?frobnicate\\]?" nil t))) | 437 | (save-excursion (should (re-search-forward "Keywords: \\[?frobnicate\\]?" nil t))) |
| 438 | ;; No description, though. Because at this point we don't know | 438 | (save-excursion (should (search-forward "This package provides a minor mode to frobnicate" |
| 439 | ;; what archive the package originated from, and we don't have | 439 | nil t))) |
| 440 | ;; its readme file saved. | ||
| 441 | ))) | 440 | ))) |
| 442 | 441 | ||
| 442 | (ert-deftest package-test-describe-installed-multi-file-package () | ||
| 443 | "Test displaying of the readme for installed multi-file package." | ||
| 444 | |||
| 445 | (with-package-test () | ||
| 446 | (package-initialize) | ||
| 447 | (package-refresh-contents) | ||
| 448 | (package-install 'multi-file) | ||
| 449 | (with-fake-help-buffer | ||
| 450 | (describe-package 'multi-file) | ||
| 451 | (goto-char (point-min)) | ||
| 452 | (should (search-forward "Homepage: http://puddles.li" nil t)) | ||
| 453 | (should (search-forward "This is a bare-bones readme file for the multi-file" | ||
| 454 | nil t))))) | ||
| 455 | |||
| 443 | (ert-deftest package-test-describe-non-installed-package () | 456 | (ert-deftest package-test-describe-non-installed-package () |
| 444 | "Test displaying of the readme for non-installed package." | 457 | "Test displaying of the readme for non-installed package." |
| 445 | 458 | ||