summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStephen Leake <stephen_leake@stephe-leake.org>2018-12-13 14:45:05 -0800
committerStephen Leake <stephen_leake@stephe-leake.org>2018-12-13 14:45:05 -0800
commitd4fb2690702fbd348977fc94a9f7a99c00cc3010 (patch)
treea55fa60e7401455bb75c91c21b2f7540dd5488f4 /test/lisp/emacs-lisp
parent87bef630bf0f45e8da74e43ba614aa2292b296ef (diff)
downloademacs-d4fb2690702fbd348977fc94a9f7a99c00cc3010.tar.gz
emacs-d4fb2690702fbd348977fc94a9f7a99c00cc3010.tar.bz2
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/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/package-tests.el19
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."
(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."