1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00

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.
This commit is contained in:
Stephen Leake 2018-12-13 14:45:05 -08:00
parent 87bef630bf
commit d4fb269070
3 changed files with 109 additions and 28 deletions

View file

@ -435,11 +435,24 @@ Must called from within a `tar-mode' buffer."
(save-excursion (should (search-forward "Summary: A single-file package with no dependencies" nil t)))
(save-excursion (should (search-forward "Homepage: http://doodles.au" nil t)))
(save-excursion (should (re-search-forward "Keywords: \\[?frobnicate\\]?" nil t)))
;; No description, though. Because at this point we don't know
;; what archive the package originated from, and we don't have
;; its readme file saved.
(save-excursion (should (search-forward "This package provides a minor mode to frobnicate"
nil t)))
)))
(ert-deftest package-test-describe-installed-multi-file-package ()
"Test displaying of the readme for installed multi-file package."
(with-package-test ()
(package-initialize)
(package-refresh-contents)
(package-install 'multi-file)
(with-fake-help-buffer
(describe-package 'multi-file)
(goto-char (point-min))
(should (search-forward "Homepage: http://puddles.li" nil t))
(should (search-forward "This is a bare-bones readme file for the multi-file"
nil t)))))
(ert-deftest package-test-describe-non-installed-package ()
"Test displaying of the readme for non-installed package."