aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/lib.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gpgscm/lib.scm')
-rw-r--r--tests/gpgscm/lib.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/gpgscm/lib.scm b/tests/gpgscm/lib.scm
index ed3d572c1..cafca8dd4 100644
--- a/tests/gpgscm/lib.scm
+++ b/tests/gpgscm/lib.scm
@@ -29,6 +29,18 @@
(assert #t)
(assert (not #f))
+;; Trace displays and returns the given value. A debugging aid.
+(define (trace x)
+ (display x)
+ (newline)
+ x)
+
+;; Stringification.
+(define (stringify expression)
+ (let ((p (open-output-string)))
+ (write expression p)
+ (get-output-string p)))
+
(define (filter pred lst)
(cond ((null? lst) '())
((pred (car lst))