summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-23 05:54:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-23 05:54:16 +0000
commitbab10f0e74fe89d53dd900290c09bbee292c863c (patch)
tree1c4fb8cc44546172c7b47dcaf0eb88f4d123a982 /test/ruby
parent48f4ae061354c1f74918b0b1fc6e7b5277c0b779 (diff)
downloadruby-bab10f0e74fe89d53dd900290c09bbee292c863c.tar.gz
ruby-bab10f0e74fe89d53dd900290c09bbee292c863c.tar.xz
ruby-bab10f0e74fe89d53dd900290c09bbee292c863c.zip
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 a7ec25d57..b8e6870af 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})")