From 9b24d8ab5018c20dc6c917b5a89b3b1fcda3e6f9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 2 Nov 2022 17:03:05 +0100 Subject: tests: Add tr:assert-same function. * tests/gpgscm/tests.scm (tr:assert-same-string): New. * tests/openpgp/shell.scm: Option to drop into a REPL. --- tests/gpgscm/tests.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/gpgscm/tests.scm') diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm index eb278e301..cebe419f8 100644 --- a/tests/gpgscm/tests.scm +++ b/tests/gpgscm/tests.scm @@ -493,6 +493,12 @@ (fail "mismatch")) (list tmpfiles source #f))) +(define (tr:assert-same reference) + (lambda (tmpfiles source) + (if (not (string=? (call-with-input-file source read-all) reference)) + (fail "mismatch")) + (list tmpfiles source #f))) + (define (tr:call-with-content function . args) (lambda (tmpfiles source) (catch (list tmpfiles source *error*) -- cgit v1.2.3