summaryrefslogtreecommitdiff
path: root/src/pkg/mail/message_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/mail/message_test.go')
-rw-r--r--src/pkg/mail/message_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pkg/mail/message_test.go b/src/pkg/mail/message_test.go
index 1ff45d2c1..e1bcc89ee 100644
--- a/src/pkg/mail/message_test.go
+++ b/src/pkg/mail/message_test.go
@@ -217,6 +217,26 @@ func TestAddressParsing(t *testing.T) {
},
},
},
+ // Custom example of RFC 2047 "B"-encoded ISO-8859-1 address.
+ {
+ `=?ISO-8859-1?B?SvZyZw==?= <joerg@example.com>`,
+ []*Address{
+ &Address{
+ Name: `Jörg`,
+ Address: "joerg@example.com",
+ },
+ },
+ },
+ // Custom example of RFC 2047 "B"-encoded UTF-8 address.
+ {
+ `=?UTF-8?B?SsO2cmc=?= <joerg@example.com>`,
+ []*Address{
+ &Address{
+ Name: `Jörg`,
+ Address: "joerg@example.com",
+ },
+ },
+ },
}
for _, test := range tests {
addrs, err := newAddrParser(test.addrsStr).parseAddressList()