diff options
author | Jorgen Schaefer <contact@jorgenschaefer.de> | 2014-12-07 22:28:38 +0100 |
---|---|---|
committer | Jorgen Schaefer <contact@jorgenschaefer.de> | 2015-01-16 11:23:36 +0100 |
commit | b689b906f27c326c4c7531d4987ffaae49b50dcd (patch) | |
tree | 0cac953ad3320aaf5a322dd500314de9292647e5 /test/automated/package-test.el | |
parent | 5d244fec3e0278110b686d66410191b89a463b93 (diff) | |
download | emacs-b689b906f27c326c4c7531d4987ffaae49b50dcd.tar.gz |
Package archives now have priorities.
* lisp/package.el: Provide repository priorities.
(package-archive-priorities): New variable.
(package--add-to-alist): New function.
(package--add-to-archive-contents): Use it.
(package-menu--find-upgrades): Use it as well. Small clean up to
make the use of the package name here explicit.
(package-archive-priority): New function.
(package-desc-priority-version): New function.
Fixes: debbugs:19296
Diffstat (limited to 'test/automated/package-test.el')
-rw-r--r-- | test/automated/package-test.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/automated/package-test.el b/test/automated/package-test.el index 27a71c528c6..89e0bc18509 100644 --- a/test/automated/package-test.el +++ b/test/automated/package-test.el @@ -230,6 +230,23 @@ Must called from within a `tar-mode' buffer." (package-refresh-contents) (package-install 'simple-single))) +(ert-deftest package-test-install-prioritized () + "Install a lower version from a higher-prioritized archive." + (with-package-test () + (let* ((newer-version (expand-file-name "data/package/newer-versions" + package-test-file-dir)) + (package-archives `(("older" . ,package-test-data-dir) + ("newer" . ,newer-version))) + (package-archive-priorities '(("newer" . 100)))) + + (package-initialize) + (package-refresh-contents) + (package-install 'simple-single) + + (let ((installed (cdr (assq 'simple-single package-alist)))) + (should (version-list-= '(1 3) + (package-desc-version installed))))))) + (ert-deftest package-test-install-multifile () "Check properties of the installed multi-file package." (with-package-test (:basedir "data/package" :install '(multi-file)) |