summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-20 17:12:58 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-20 17:12:58 +0000
commit0015e122d85f942565f0710735ea188fb6a71d11 (patch)
treeb80d2cfa2d8c2d466b3bf03e7462b53d5a4f7a74 /test
parent2a677d82f11ff0973e8cb1b23255a182350a3880 (diff)
downloadruby-0015e122d85f942565f0710735ea188fb6a71d11.tar.gz
ruby-0015e122d85f942565f0710735ea188fb6a71d11.tar.xz
ruby-0015e122d85f942565f0710735ea188fb6a71d11.zip
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_m17n.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index 2df720322..5a0115e28 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -890,6 +890,9 @@ class TestM17N < Test::Unit::TestCase
end
def test_marshal
+ s1 = "\xa1\xa1".force_encoding("euc-jp")
+ s2 = Marshal.load(Marshal.dump(s1))
+ assert_equal(s1, s2)
end
def test_env
@@ -898,4 +901,10 @@ class TestM17N < Test::Unit::TestCase
assert_equal(Encoding::ASCII_8BIT, v.encoding)
}
end
+
+ def test_encoding_find
+ assert_raise(ArgumentError) {
+ Encoding.find("utf-8".force_encoding("utf-16be"))
+ }
+ end
end