about summary refs log tree commit diff
path: root/t
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-06-18 11:30:37 +0200
committerLeah Neukirchen <leah@vuxu.org>2021-06-18 11:32:18 +0200
commit014f82ef0c4407c1a4649384b7b5ea0809120d2b (patch)
tree35e3b64e4a1ff597841e98c22f6b3bb9066c6559 /t
parentd324b92dd48e6eabdb3cf0cb2aecfff21cc24614 (diff)
downloadmblaze-014f82ef0c4407c1a4649384b7b5ea0809120d2b.tar.gz
mblaze-014f82ef0c4407c1a4649384b7b5ea0809120d2b.tar.xz
mblaze-014f82ef0c4407c1a4649384b7b5ea0809120d2b.zip
t/1000-mmime.t: add tests for recent changes
Diffstat (limited to 't')
-rwxr-xr-xt/1000-mmime.t28
1 files changed, 27 insertions, 1 deletions
diff --git a/t/1000-mmime.t b/t/1000-mmime.t
index 47ca63b..0408d32 100755
--- a/t/1000-mmime.t
+++ b/t/1000-mmime.t
@@ -1,7 +1,7 @@
 #!/bin/sh -e
 cd ${0%/*}
 . ./lib.sh
-plan 12
+plan 16
 
 cat <<EOF >tmp
 References: <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@a> <bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb@b> <ccccccccccccccccccccccccccccccc@c>
@@ -89,3 +89,29 @@ This part too.
 EOF
 
 check 'content-transfer-encoding is respected if found in input, for multipart/mixed' 'mmime <tmp2 |grep f=C3=B6=C3=B6'
+
+cat <<EOF >tmp2
+From: Kerstin Krüger <krueger@example.com>
+
+Body.
+EOF
+
+check 'non-ASCII is encoded as UTF-8' 'mmime <tmp2 | grep "UTF-8.*=C3=BC"'
+
+cat <<EOF >tmp2
+From: "Krüger, Kerstin" <krueger@example.com>
+
+Body.
+EOF
+
+check 'non-ASCII quoted-strings are encoded as one encoded-word' 'mmime <tmp2 | grep "UTF-8.*=2C_"'
+
+check 'non-ASCII quoted-strings are encoded without quotes' 'mmime <tmp2 | grep -v "=22"'
+
+cat <<EOF >tmp2
+From: "kerstin krueger"@example.com
+
+Body.
+EOF
+
+check 'non-encoded quoted-strings are kept correctly' 'mmime <tmp2 | grep \"@'