From eab0138e3179f247180a639a91570e5ee2c6ad0e Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 4 May 2017 14:24:50 +0200 Subject: tests: Add function to dump packets. * tests/openpgp/defs.scm (gpg-dump-packets): New function. Signed-off-by: Justus Winter --- tests/openpgp/defs.scm | 6 ++++++ 1 file changed, 6 insertions(+) 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. ;; -- cgit v1.2.3