[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1222ff5 1/2: Don't skip epg-tests even with gpg 2.0
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 1222ff5 1/2: Don't skip epg-tests even with gpg 2.0 (Bug#23561) |
Date: |
Thu, 12 Jul 2018 21:46:48 -0400 (EDT) |
branch: master
commit 1222ff5275e61e797d388489b8a88f499247321d
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
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.
---
test/lisp/epg-tests.el | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/test/lisp/epg-tests.el b/test/lisp/epg-tests.el
index 0fe1501..7efe04b 100644
--- a/test/lisp/epg-tests.el
+++ b/test/lisp/epg-tests.el
@@ -30,8 +30,19 @@
(expand-file-name "data/epg" (getenv "EMACS_TEST_DIRECTORY"))
"Directory containing epg test data.")
+(defconst epg-tests--config-program-alist
+ ;; The default `epg-config--program-alist' requires gpg2 2.1 or
+ ;; greater due to some practical problems with pinentry. But the
+ ;; tests here all work fine with 2.0 as well.
+ (let ((prog-alist (copy-sequence epg-config--program-alist)))
+ (setf (alist-get "gpg2"
+ (alist-get 'OpenPGP prog-alist)
+ nil nil #'equal)
+ "2.0")
+ prog-alist))
+
(defun epg-tests-find-usable-gpg-configuration (&optional _require-passphrase)
- (epg-find-configuration 'OpenPGP 'no-cache))
+ (epg-find-configuration 'OpenPGP 'no-cache epg-tests--config-program-alist))
(defun epg-tests-passphrase-callback (_c _k _d)
;; Need to create a copy here, since the string will be wiped out