aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoam Postavsky2018-07-11 20:01:11 -0400
committerNoam Postavsky2018-07-12 21:45:30 -0400
commit1222ff5275e61e797d388489b8a88f499247321d (patch)
treeb122657a6fd662b16b61041e0aa07c6eedd7363b
parentaeefbc41be093ceb1222d9b430fb44b69de660e2 (diff)
downloademacs-1222ff5275e61e797d388489b8a88f499247321d.tar.gz
emacs-1222ff5275e61e797d388489b8a88f499247321d.zip
Don't skip epg-tests even with gpg 2.0 (Bug#23561)
* test/lisp/epg-tests.el (epg-tests--config-program-alist): New constant, which allows gpg2 version 2.0+. (epg-tests-find-usable-gpg-configuration): Pass it to epg-find-configuration.
-rw-r--r--test/lisp/epg-tests.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/lisp/epg-tests.el b/test/lisp/epg-tests.el
index 0fe15017dd0..7efe04bfc00 100644
--- a/test/lisp/epg-tests.el
+++ b/test/lisp/epg-tests.el
@@ -30,8 +30,19 @@
30 (expand-file-name "data/epg" (getenv "EMACS_TEST_DIRECTORY")) 30 (expand-file-name "data/epg" (getenv "EMACS_TEST_DIRECTORY"))
31 "Directory containing epg test data.") 31 "Directory containing epg test data.")
32 32
33(defconst epg-tests--config-program-alist
34 ;; The default `epg-config--program-alist' requires gpg2 2.1 or
35 ;; greater due to some practical problems with pinentry. But the
36 ;; tests here all work fine with 2.0 as well.
37 (let ((prog-alist (copy-sequence epg-config--program-alist)))
38 (setf (alist-get "gpg2"
39 (alist-get 'OpenPGP prog-alist)
40 nil nil #'equal)
41 "2.0")
42 prog-alist))
43
33(defun epg-tests-find-usable-gpg-configuration (&optional _require-passphrase) 44(defun epg-tests-find-usable-gpg-configuration (&optional _require-passphrase)
34 (epg-find-configuration 'OpenPGP 'no-cache)) 45 (epg-find-configuration 'OpenPGP 'no-cache epg-tests--config-program-alist))
35 46
36(defun epg-tests-passphrase-callback (_c _k _d) 47(defun epg-tests-passphrase-callback (_c _k _d)
37 ;; Need to create a copy here, since the string will be wiped out 48 ;; Need to create a copy here, since the string will be wiped out