summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-09 07:42:34 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-09 07:42:34 +0000
commit5a0f41a588ee5db603b89d8b26aa897093064413 (patch)
treede64006af2c0504ab0ef84a0660bffafa120dd3b /test
parentae6555aa25de6aadeeb0dd1efc9aca9b5dbba9d7 (diff)
* lib/net/imap.rb: use frozen_string_literal: true.
* test/net/imap/test_imap.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/net/imap/test_imap.rb9
-rw-r--r--test/net/imap/test_imap_response_parser.rb3
2 files changed, 9 insertions, 3 deletions
diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb
index da33533..bf57aa5 100644
--- a/test/net/imap/test_imap.rb
+++ b/test/net/imap/test_imap.rb
@@ -1,3 +1,6 @@
+#
+# -*- frozen_string_literal: true -*-
+
require "net/imap"
require "test/unit"
@@ -26,13 +29,13 @@ class IMAPTest < Test::Unit::TestCase
assert_equal("foo", Net::IMAP.encode_utf7("foo"))
assert_equal("&-", Net::IMAP.encode_utf7("&"))
- utf8 = "\357\274\241\357\274\242\357\274\243".force_encoding("UTF-8")
+ utf8 = "\357\274\241\357\274\242\357\274\243".dup.force_encoding("UTF-8")
s = Net::IMAP.encode_utf7(utf8)
assert_equal("&,yH,Iv8j-", s)
s = Net::IMAP.encode_utf7("foo&#{utf8}-bar".encode("EUC-JP"))
assert_equal("foo&-&,yH,Iv8j--bar", s)
- utf8 = "\343\201\202&".force_encoding("UTF-8")
+ utf8 = "\343\201\202&".dup.force_encoding("UTF-8")
s = Net::IMAP.encode_utf7(utf8)
assert_equal("&MEI-&-", s)
s = Net::IMAP.encode_utf7(utf8.encode("EUC-JP"))
@@ -44,7 +47,7 @@ class IMAPTest < Test::Unit::TestCase
assert_equal("&-", Net::IMAP.decode_utf7("&--"))
s = Net::IMAP.decode_utf7("&,yH,Iv8j-")
- utf8 = "\357\274\241\357\274\242\357\274\243".force_encoding("UTF-8")
+ utf8 = "\357\274\241\357\274\242\357\274\243".dup.force_encoding("UTF-8")
assert_equal(utf8, s)
end
diff --git a/test/net/imap/test_imap_response_parser.rb b/test/net/imap/test_imap_response_parser.rb
index 1612d78..1104a49 100644
--- a/test/net/imap/test_imap_response_parser.rb
+++ b/test/net/imap/test_imap_response_parser.rb
@@ -1,3 +1,6 @@
+#
+# -*- frozen_string_literal: true -*-
+
require "net/imap"
require "test/unit"