mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
tests/openpgp: Port the remaining tests to Scheme.
* tests/openpgp/Makefile.am (TESTS): Add new tests. * tests/openpgp/defs.scm (gpg-with-colons): New function. (get-config): Use new function. * tests/openpgp/export.scm: New file. * tests/openpgp/tofu.scm: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
65081c31e7
commit
0340fcdac8
4 changed files with 272 additions and 13 deletions
|
@ -82,12 +82,13 @@
|
|||
(define (pipe:gpg args)
|
||||
(pipe:spawn `(,@GPG --output - ,@args -)))
|
||||
|
||||
(define (gpg-with-colons args)
|
||||
(let ((s (call-popen `(,@GPG --with-colons ,@args) "")))
|
||||
(map (lambda (line) (string-split line #\:))
|
||||
(string-split s #\newline))))
|
||||
|
||||
(define (get-config what)
|
||||
(let* ((config-string
|
||||
(call-popen `(,@GPG --with-colons --list-config ,what) ""))
|
||||
(config (string-splitn
|
||||
(string-rtrim char-whitespace? config-string) #\: 2)))
|
||||
(string-split (caddr config) #\;)))
|
||||
(string-split (caddar (gpg-with-colons `(--list-config ,what))) #\;))
|
||||
|
||||
(define all-pubkey-algos (get-config "pubkeyname"))
|
||||
(define all-hash-algos (get-config "digestname"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue