mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add a test for [ruby-dev:33826]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8ccd884498
commit
fbe308de9d
1 changed files with 7 additions and 0 deletions
|
@ -1149,4 +1149,11 @@ class TestM17N < Test::Unit::TestCase
|
|||
def test_euc_tw
|
||||
assert_equal("a", "a\x8e\xa2\xa1\xa1".force_encoding("euc-tw").chop)
|
||||
end
|
||||
|
||||
def test_valid_encoding
|
||||
s = "\xa1".force_encoding("euc-jp")
|
||||
assert_equal(false, s.valid_encoding?)
|
||||
assert_equal(true,(s+s).valid_encoding?, "[ruby-dev:33826]")
|
||||
assert_equal(true,(s*2).valid_encoding?, "[ruby-dev:33826]")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue