summaryrefslogtreecommitdiff
path: root/tests/quoted-printable.scm
diff options
context:
space:
mode:
authorArun Isaac2018-09-12 15:42:47 +0530
committerArun Isaac2018-09-12 15:42:47 +0530
commitbfed089d9973b1208f2b0e67dc457f3a6bcddd28 (patch)
tree4640b467b53d8f3487c675aee01e1505f46535c1 /tests/quoted-printable.scm
parent4bc18f4e24318c860481df4fb3c243cc205ef03f (diff)
downloadguile-email-bfed089d9973b1208f2b0e67dc457f3a6bcddd28.tar.gz
guile-email-bfed089d9973b1208f2b0e67dc457f3a6bcddd28.tar.lz
guile-email-bfed089d9973b1208f2b0e67dc457f3a6bcddd28.zip
tests: Add tests for Q-encoding.
* tests/quoted-printable.scm ("wikipedia example"): Rename to ... ("quoted-printable wikipedia example"): ... this. ("q-encoding wikipedia example"): New test.
Diffstat (limited to 'tests/quoted-printable.scm')
-rwxr-xr-xtests/quoted-printable.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/quoted-printable.scm b/tests/quoted-printable.scm
index ad13426..c57c833 100755
--- a/tests/quoted-printable.scm
+++ b/tests/quoted-printable.scm
@@ -23,7 +23,7 @@
(test-begin "quoted-printable")
-(test-equal "wikipedia example"
+(test-equal "quoted-printable wikipedia example"
(bytevector->string
(quoted-printable-decode "J'interdis aux marchands de vanter trop leur marchandises. Car ils se font =
vite p=C3=A9dagogues et t'enseignent comme but ce qui n'est par essence qu'=
@@ -33,4 +33,10 @@ abriquent pour te la vendre une =C3=A2me vulgaire.")
"UTF-8")
"J'interdis aux marchands de vanter trop leur marchandises. Car ils se font vite pédagogues et t'enseignent comme but ce qui n'est par essence qu'un moyen, et te trompant ainsi sur la route à suivre les voilà bientôt qui te dégradent, car si leur musique est vulgaire ils te fabriquent pour te la vendre une âme vulgaire.")
+(test-equal "q-encoding wikipedia example"
+ (bytevector->string
+ (q-encoding-decode "=A1Hola,_se=F1or!")
+ "ISO-8859-1")
+ "¡Hola, señor!")
+
(test-end "quoted-printable")