From 02431261e07c3e069f14311e34faf2a5a7eefdd0 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 21 May 2020 04:00:56 +0530 Subject: tests: Add tests for (email base64). * tests/encoding.scm: Move common code for encoding tests to this new file. * tests/quoted-printable.scm: Load encoding.scm. * tests/base64.scm: New file. * Makefile.am (SCM_TESTS): Register tests/base64.scm. --- tests/quoted-printable.scm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'tests/quoted-printable.scm') diff --git a/tests/quoted-printable.scm b/tests/quoted-printable.scm index 267011a..0b5b462 100644 --- a/tests/quoted-printable.scm +++ b/tests/quoted-printable.scm @@ -23,17 +23,7 @@ (srfi srfi-1) (srfi srfi-64)) -(set! *random-state* (random-state-from-platform)) - -(define (random-bytevector len) - "Return a random bytevector of length LEN." - (u8-list->bytevector - (map (lambda _ (random 256)) (iota len)))) - -(define (each-line-has-a-maximum-of-76-characters? str) - (every (lambda (line) - (<= (string-length line) 76)) - (string-split str #\newline))) +(load "encoding.scm") (define (string-has-only-quoted-printable-valid-characters? str) (string-every (char-set-union -- cgit v1.2.3