diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-08 10:48:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-08 10:48:52 +0000 |
commit | 2045c3f7e2e15733d849348a698855594886dcb0 (patch) | |
tree | abda3711646b98af1c41093bc4d14fdf55fd5ef5 | |
parent | 0f7ef7046c146b7ae5b8e1c5936260055f4fc4ce (diff) | |
download | ruby-2045c3f7e2e15733d849348a698855594886dcb0.tar.gz ruby-2045c3f7e2e15733d849348a698855594886dcb0.tar.xz ruby-2045c3f7e2e15733d849348a698855594886dcb0.zip |
* test/ruby/test_string.rb (test_chop, test_chop!): tests for [ruby-core:23155].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_string.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index ee9c2144f..b209296ef 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -405,6 +405,7 @@ class TestString < Test::Unit::TestCase assert_equal(S("hello\n"), S("hello\n\r").chop) assert_equal(S(""), S("\r\n").chop) assert_equal(S(""), S("").chop) + assert_equal(S("a").hash, S("a\u00d8").chop.hash) end def test_chop! @@ -423,6 +424,10 @@ class TestString < Test::Unit::TestCase a = S("").chop! assert_nil(a) + a = S("a\u00d8") + a.chop! + assert_equal(S("a").hash, a.hash) + a = S("hello\n") b = a.dup assert_equal(S("hello"), a.chop!) |