summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2018-09-15 16:01:03 +0530
committerArun Isaac2018-09-15 16:10:15 +0530
commit54d005a0f1ff7ba5eb29d975e4f6735d24a4c972 (patch)
treed0978e56ff7392e564b176ce795819eb01e04402 /tests
parenta3f62b26c559bee108eb59dc3afe9bce5d4b46cd (diff)
downloadguile-email-54d005a0f1ff7ba5eb29d975e4f6735d24a4c972.tar.gz
guile-email-54d005a0f1ff7ba5eb29d975e4f6735d24a4c972.tar.lz
guile-email-54d005a0f1ff7ba5eb29d975e4f6735d24a4c972.zip
quoted-printable: Q-encode #\? and #\_ with their ASCII values.
* email/quoted-printable.scm (%q-encoding-literal-char-set, %quoted-printable-literal-char-set): New variables. (quoted-printable-encode): Move core encoding code to ... (quoted-printable-style-encode): ... this new function. (q-encoding-decode): Call quoted-printable-style-encode with the appropriate literal-char-set instead of calling quoted-printable-encode. * tests/quoted-printable.scm (q-encoding of special characters): Add to check for this bug.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/quoted-printable.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/quoted-printable.scm b/tests/quoted-printable.scm
index 334380d..554b85d 100755
--- a/tests/quoted-printable.scm
+++ b/tests/quoted-printable.scm
@@ -106,4 +106,10 @@ abriquent pour te la vendre une =C3=A2me vulgaire.")
charset)
decoded-text))
+(test-equal "q-encoding of special characters"
+ (q-encoding-encode (string->bytevector " _?" "UTF-8"))
+ (string-append "_"
+ (quoted-printable-escape-encode-char #\_)
+ (quoted-printable-escape-encode-char #\?)))
+
(test-end "quoted-printable")