3 ;; Copyright (C) 2017 g10 Code GmbH
5 ;; This file is part of GnuPG.
7 ;; GnuPG is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 3 of the License, or
10 ;; (at your option) any later version.
12 ;; GnuPG is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
20 (load (with-path "defs.scm"))
24 "Checking reading and writing configuration via gpgconf... "
25 (lambda (name opt make-value)
29 (do ((i 0 (+ 1 i))) ((> i 12) #t)
30 (let ((value (make-value i)))
34 (assert (string=? value (list-ref (opt::value) 9))))
37 (let ((v (opt::value)))
38 (assert (or (< (length v) 10)
39 (string=? "" (list-ref v 9))))))))
41 (lambda (name . rest) name)
42 (list "keyserver" "verbose" "quiet")
43 (list (gpg-config 'gpg "keyserver")
44 (gpg-config 'gpg "verbose")
45 (gpg-config 'gpg "quiet"))
46 (list (lambda (i) (if (even? i) "\"hkp://foo.bar" "\"hkps://bar.baz"))
47 (lambda (i) (number->string
48 ;; gpgconf: argument for option verbose of type 0
49 ;; (none) must be positive
51 (lambda (i) (if (even? i) #f "1"))))