aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index a7ec25d57d..b8e6870afc 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -297,6 +297,9 @@ class TestM17N < Test::Unit::TestCase
end
def test_utf16
+ s = "aaaa".force_encoding("utf-16be")
+ assert_equal(s.encoding, s.intern.to_s.encoding, "#{encdump s}.intern.to_s.encoding")
+
s1 = "aa".force_encoding("utf-16be")
s2 = "z".force_encoding("us-ascii")
assert_nil(Encoding.compatible?(s1, s2), "Encoding.compatible?(#{encdump s1}, #{encdump s2})")