diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 26 | ||||
| -rw-r--r-- | test/automated/data/package/archive-contents | 6 | ||||
| -rw-r--r-- | test/automated/data/package/multi-file-0.2.3.tar | bin | 20480 -> 20480 bytes | |||
| -rw-r--r-- | test/automated/data/package/simple-single-1.3.el | 1 | ||||
| -rw-r--r-- | test/automated/package-test.el | 37 | ||||
| -rw-r--r-- | test/automated/package-x-test.el | 6 |
6 files changed, 47 insertions, 29 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index c8785ab4fec..3f115d9e4e8 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,29 @@ +2013-09-29 Dmitry Gutov <dgutov@yandex.ru> + + * automated/package-test.el (simple-single-desc-1-4): Remove, it + was unused. + (simple-single-desc): Expect :homepage property. + (multi-file-desc): Same. + (with-package-test): Do not save previous `default-directory' + value, let-bind the var instead. + (package-test-install-single): Expect :homepage property in the + generated pkg file. + (package-test-describe-package): Expect Homepage button. + (package-test-describe-non-installed-package) + (package-test-describe-non-installed-multi-file-package): Same. + (package-test-describe-not-installed-package): Remove, it was a + duplicate. + + * automated/package-x-test.el + (package-x-test--single-archive-entry-1-3): Expect :homepage + property. + (package-x-test--single-archive-entry-1-4): Expect nil extras slot. + + * automated/data/package/simple-single-1.3.el: Add URL header. + + * automated/data/package/archive-contents: Add :homepage + properties to `simple-single' and `multi-file'. + 2013-09-22 Daniel Colascione <dancol@dancol.org> * automated/data-test.el: diff --git a/test/automated/data/package/archive-contents b/test/automated/data/package/archive-contents index 7e4a410030f..b26179c0c3b 100644 --- a/test/automated/data/package/archive-contents +++ b/test/automated/data/package/archive-contents @@ -1,10 +1,12 @@ (1 (simple-single . [(1 3) - nil "A single-file package with no dependencies" single]) + nil "A single-file package with no dependencies" single + ((:homepage . "http://doodles.au"))]) (simple-depend . [(1 0) ((simple-single (1 3))) "A single-file package with a dependency." single]) (multi-file . [(0 2 3) - nil "Example of a multi-file tar package" tar])) + nil "Example of a multi-file tar package" tar + ((:homepage . "http://puddles.li"))])) diff --git a/test/automated/data/package/multi-file-0.2.3.tar b/test/automated/data/package/multi-file-0.2.3.tar Binary files differindex bdbbab0e6f4..dde331d0e01 100644 --- a/test/automated/data/package/multi-file-0.2.3.tar +++ b/test/automated/data/package/multi-file-0.2.3.tar diff --git a/test/automated/data/package/simple-single-1.3.el b/test/automated/data/package/simple-single-1.3.el index a61784164f8..6756a28080b 100644 --- a/test/automated/data/package/simple-single-1.3.el +++ b/test/automated/data/package/simple-single-1.3.el @@ -3,6 +3,7 @@ ;; Author: J. R. Hacker <jrh@example.com> ;; Version: 1.3 ;; Keywords: frobnicate +;; URL: http://doodles.au ;;; Commentary: diff --git a/test/automated/package-test.el b/test/automated/package-test.el index 799009063e1..b5235ee99a9 100644 --- a/test/automated/package-test.el +++ b/test/automated/package-test.el @@ -47,16 +47,10 @@ (package-desc-create :name 'simple-single :version '(1 3) :summary "A single-file package with no dependencies" - :kind 'single) + :kind 'single + :extras '((:homepage . "http://doodles.au"))) "Expected `package-desc' parsed from simple-single-1.3.el.") -(defvar simple-single-desc-1-4 - (package-desc-create :name 'simple-single - :version '(1 4) - :summary "A single-file package with no dependencies" - :kind 'single) - "Expected `package-desc' parsed from simple-single-1.4.el.") - (defvar simple-depend-desc (package-desc-create :name 'simple-depend :version '(1 0) @@ -69,7 +63,8 @@ (package-desc-create :name 'multi-file :version '(0 2 3) :summary "Example of a multi-file tar package" - :kind 'tar) + :kind 'tar + :extras '((:homepage . "http://puddles.li"))) "Expected `package-desc' from \"multi-file-0.2.3.tar\".") (defvar new-pkg-desc @@ -97,7 +92,7 @@ (package-user-dir package-test-user-dir) (package-archives `(("gnu" . ,package-test-data-dir))) (old-yes-no-defn (symbol-function 'yes-or-no-p)) - (old-pwd default-directory) + (default-directory package-test-file-dir) package--initialized package-alist ,@(if update-news @@ -128,8 +123,7 @@ (when (and (boundp 'package-test-archive-upload-base) (file-directory-p package-test-archive-upload-base)) (delete-directory package-test-archive-upload-base t)) - (setf (symbol-function 'yes-or-no-p) old-yes-no-defn) - (cd old-pwd)))) + (setf (symbol-function 'yes-or-no-p) old-yes-no-defn)))) (defmacro with-fake-help-buffer (&rest body) "Execute BODY in a temp buffer which is treated as the \"*Help*\" buffer." @@ -194,7 +188,9 @@ Must called from within a `tar-mode' buffer." (should (string= (buffer-string) (concat "(define-package \"simple-single\" \"1.3\" " "\"A single-file package " - "with no dependencies\" 'nil)\n")))) + "with no dependencies\" 'nil " + ":homepage \"http://doodles.au\"" + ")\n")))) (should (file-exists-p autoloads-file)) (should-not (get-file-buffer autoloads-file))))) @@ -319,23 +315,12 @@ Must called from within a `tar-mode' buffer." (should (search-forward "Version: 1.3" nil t)) (should (search-forward "Summary: A single-file package with no dependencies" nil t)) + (should (search-forward "Homepage: http://doodles.au" 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. ))) -(ert-deftest package-test-describe-not-installed-package () - "Test displaying of the readme for not-installed package." - - (with-package-test () - (package-initialize) - (package-refresh-contents) - (with-fake-help-buffer - (describe-package 'simple-single) - (goto-char (point-min)) - (should (search-forward "This package provides a minor mode to frobnicate" - nil t))))) - (ert-deftest package-test-describe-non-installed-package () "Test displaying of the readme for non-installed package." @@ -345,6 +330,7 @@ Must called from within a `tar-mode' buffer." (with-fake-help-buffer (describe-package 'simple-single) (goto-char (point-min)) + (should (search-forward "Homepage: http://doodles.au" nil t)) (should (search-forward "This package provides a minor mode to frobnicate" nil t))))) @@ -357,6 +343,7 @@ Must called from within a `tar-mode' buffer." (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))))) diff --git a/test/automated/package-x-test.el b/test/automated/package-x-test.el index beb18358085..c7b82360dd8 100644 --- a/test/automated/package-x-test.el +++ b/test/automated/package-x-test.el @@ -48,14 +48,16 @@ (cons 'simple-single (package-make-ac-desc '(1 3) nil "A single-file package with no dependencies" - 'single)) + 'single + '((:homepage . "http://doodles.au")))) "Expected contents of the archive entry from the \"simple-single\" package.") (defvar package-x-test--single-archive-entry-1-4 (cons 'simple-single (package-make-ac-desc '(1 4) nil "A single-file package with no dependencies" - 'single)) + 'single + nil)) "Expected contents of the archive entry from the updated \"simple-single\" package.") (ert-deftest package-x-test-upload-buffer () |
