diff options
Diffstat (limited to 'test/net/imap')
-rw-r--r-- | test/net/imap/test_imap.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb index aa4215224f..a984cbe4ed 100644 --- a/test/net/imap/test_imap.rb +++ b/test/net/imap/test_imap.rb @@ -3,12 +3,14 @@ require "test/unit" class IMAPTest < Test::Unit::TestCase def test_encode_utf7 - s = Net::IMAP.encode_utf7("\357\274\241\357\274\242\357\274\243") - assert_equal("&,yH,Iv8j-", s) + utf8 = "\357\274\241\357\274\242\357\274\243".force_encoding("UTF-8") + s = Net::IMAP.encode_utf7(utf8) + assert_equal("&,yH,Iv8j-".force_encoding("UTF-8"), s) end def test_decode_utf7 s = Net::IMAP.decode_utf7("&,yH,Iv8j-") - assert_equal("\357\274\241\357\274\242\357\274\243", s) + utf8 = "\357\274\241\357\274\242\357\274\243".force_encoding("UTF-8") + assert_equal(utf8, s) end end |