diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 13:33:26 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 13:33:26 +0000 |
| commit | 3dc326319fab3b0ef8c622f7f6601a3a5627f630 (patch) | |
| tree | 51c4dad578e11e5abfd6025f46528f52de6a4fc5 /test/ruby/test_utf16.rb | |
| parent | 4574cf872b0efe4e0b6ef180a5e273fccf0b628e (diff) | |
| download | ruby-3dc326319fab3b0ef8c622f7f6601a3a5627f630.tar.gz ruby-3dc326319fab3b0ef8c622f7f6601a3a5627f630.tar.xz ruby-3dc326319fab3b0ef8c622f7f6601a3a5627f630.zip | |
* string.c (rb_str_chomp_bang): now works on UTF-16.
* string.c (tr_setup_table): negation should work on non ASCII
compatible strings as well.
* string.c (rb_str_split_m): awk split should work on non ASCII
compatible strings as well.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_utf16.rb')
| -rw-r--r-- | test/ruby/test_utf16.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ruby/test_utf16.rb b/test/ruby/test_utf16.rb index 1647563f8..74ddcf752 100644 --- a/test/ruby/test_utf16.rb +++ b/test/ruby/test_utf16.rb @@ -232,9 +232,11 @@ EOT def test_chomp s = "\1\n".force_encoding("utf-16be") - assert_raise(ArgumentError, "#{encdump s}.chomp") { - s.chomp - } + assert_equal(s, s.chomp, "#{encdump s}.chomp") + s = "\0\n".force_encoding("utf-16be") + assert_equal("", s.chomp, "#{encdump s}.chomp") + s = "\0\r\0\n".force_encoding("utf-16be") + assert_equal("", s.chomp, "#{encdump s}.chomp") end def test_succ |
