summaryrefslogtreecommitdiff
path: root/test/automated
diff options
context:
space:
mode:
authorJorgen Schaefer <contact@jorgenschaefer.de>2015-01-22 21:06:47 +0100
committerJorgen Schaefer <contact@jorgenschaefer.de>2015-01-22 21:06:47 +0100
commit2f908e0cac317b381393e3efb70ec08dfaab5383 (patch)
treea76d51e0f40e6b0c91ef0d5fcea4f316ce881876 /test/automated
parent3e359626e64c50efe31e3f5965d199cb69bb4a8d (diff)
downloademacs-2f908e0cac317b381393e3efb70ec08dfaab5383.tar.gz
Re-add and fix prioritized archives test.
* automated/package-test.el (package-test-install-prioritized): Re-add the test case and add priority to the correct repository this time around.
Diffstat (limited to 'test/automated')
-rw-r--r--test/automated/package-test.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/automated/package-test.el b/test/automated/package-test.el
index 27a71c528c6..3ea13dee4ad 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 '(("older" . 100))))
+
+ (package-initialize)
+ (package-refresh-contents)
+ (package-install 'simple-single)
+
+ (let ((installed (cadr (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))