aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/tests.scm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/gpgscm/tests.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index 272881757..c32e2fa5e 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -94,9 +94,6 @@
CLOSED_FD
(if (< *verbose* 0) STDOUT_FILENO CLOSED_FD)
(if (< *verbose* 0) STDERR_FILENO CLOSED_FD)))
-(define (call-check what)
- (if (not (= 0 (call what)))
- (throw (list what "failed"))))
;; Accessor functions for the results of 'spawn-process'.
(define :stdin car)
@@ -119,6 +116,12 @@
;; ':stderr' can also be used.
(define :retcode car)
+(define (call-check what)
+ (let ((result (call-with-io what "")))
+ (if (= 0 (:retcode result))
+ (:stdout result)
+ (throw (list what "failed:" (:stderr result))))))
+
(define (call-popen command input-string)
(let ((result (call-with-io command input-string)))
(if (= 0 (:retcode result))