aboutsummaryrefslogtreecommitdiffstats
path: root/tests/openpgp/defs.scm
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-05-04 12:24:50 +0000
committerJustus Winter <[email protected]>2017-05-04 12:25:38 +0000
commiteab0138e3179f247180a639a91570e5ee2c6ad0e (patch)
treec02dc1d11af5b45ab9e406dc8933d9e073927913 /tests/openpgp/defs.scm
parentspeedo,w32: Fix silent user mode installation (diff)
downloadgnupg-eab0138e3179f247180a639a91570e5ee2c6ad0e.tar.gz
gnupg-eab0138e3179f247180a639a91570e5ee2c6ad0e.zip
tests: Add function to dump packets.
* tests/openpgp/defs.scm (gpg-dump-packets): New function. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/openpgp/defs.scm')
-rw-r--r--tests/openpgp/defs.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
index 9e681bf92..8d7caed04 100644
--- a/tests/openpgp/defs.scm
+++ b/tests/openpgp/defs.scm
@@ -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.
;;