mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e790252544
commit
9007ae26a9
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue