tests: Add function to dump packets.

* tests/openpgp/defs.scm (gpg-dump-packets): New function.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-05-04 14:24:50 +02:00
parent d378cc34a8
commit eab0138e31
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020
1 changed files with 6 additions and 0 deletions

View File

@ -299,6 +299,12 @@
(pipe:spawn `(,@GPG --dearmor))
(pipe:write-to sink-name (logior O_WRONLY O_CREAT O_BINARY) #o600)))
(define (gpg-dump-packets source-name sink-name)
(pipe:do
(pipe:open source-name (logior O_RDONLY O_BINARY))
(pipe:spawn `(,@GPG --list-packets))
(pipe:write-to sink-name (logior O_WRONLY O_CREAT O_BINARY) #o600)))
;;
;; Support for test environment creation and teardown.
;;