Permalink
Browse files

Add test with decode_header

  • Loading branch information...
1 parent 749b140 commit 5573728e0eed403b919d947c5ee30fb6c6554dbb @arjan arjan committed Nov 5, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/mimemail.erl
View
@@ -1510,6 +1510,12 @@ rfc2047_decode_test_() ->
fun() ->
?assertEqual(<<"Jacek Złydach <jacek.zlydach@erlang-solutions.com>, chak de planet óóóó <jz@erlang-solutions.com>, Jacek Złydach <jacek.zlydach@erlang-solutions.com>, chak de planet óóóó <jz@erlang-solutions.com>">>, decode_header(<<"=?UTF-8?B?SmFjZWsgWsWCeWRhY2g=?= <jacek.zlydach@erlang-solutions.com>, =?UTF-8?B?Y2hhayBkZSBwbGFuZXQgw7PDs8Ozw7M=?= <jz@erlang-solutions.com>, =?UTF-8?B?SmFjZWsgWsWCeWRhY2g=?= <jacek.zlydach@erlang-solutions.com>, =?UTF-8?B?Y2hhayBkZSBwbGFuZXQgw7PDs8Ozw7M=?= <jz@erlang-solutions.com>">>, "utf-8"))
end
+ },
+ {"decode something I encoded myself",
+ fun() ->
+ A = <<"Jacek Złydach <jacek.zlydach@erlang-solutions.com>">>,
+ ?assertEqual(A, decode_header(list_to_binary(rfc2047_utf8_encode(A)), "utf-8"))
+ end
}
].

0 comments on commit 5573728

Please sign in to comment.