From 0015e122d85f942565f0710735ea188fb6a71d11 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 20 Jan 2008 17:12:58 +0000 Subject: add a test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_m17n.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ruby') 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 -- cgit