summaryrefslogtreecommitdiff
path: root/tests/quoted-printable.scm
diff options
context:
space:
mode:
authorArun Isaac2020-05-21 04:00:56 +0530
committerArun Isaac2020-05-25 19:09:20 +0530
commit02431261e07c3e069f14311e34faf2a5a7eefdd0 (patch)
tree4c4cc3bc3c8cd092e1684709521b95983de6a595 /tests/quoted-printable.scm
parent4d8ddfb30b5792280d11d58b2e1faf01f91121a9 (diff)
downloadguile-email-02431261e07c3e069f14311e34faf2a5a7eefdd0.tar.gz
guile-email-02431261e07c3e069f14311e34faf2a5a7eefdd0.tar.lz
guile-email-02431261e07c3e069f14311e34faf2a5a7eefdd0.zip
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.
Diffstat (limited to 'tests/quoted-printable.scm')
-rw-r--r--tests/quoted-printable.scm12
1 files changed, 1 insertions, 11 deletions
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