зеркало из https://github.com/github/ruby.git
* test/ruby/test_string.rb: Added extra testcase for test_rstrip_bang
and test_lstrip_bang. [fix GH-1178] Patch by @Matrixbirds git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
4c6713f374
Коммит
c626cb6904
|
@ -1,3 +1,8 @@
|
|||
Mon Jan 18 12:04:34 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_string.rb: Added extra testcase for test_rstrip_bang
|
||||
and test_lstrip_bang. [fix GH-1178] Patch by @Matrixbirds
|
||||
|
||||
Mon Jan 18 11:47:27 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
|
||||
* string.c: fix a typo. [fix GH-1202][ci skip] Patch by @sunboshan
|
||||
|
|
|
@ -2155,6 +2155,10 @@ class TestString < Test::Unit::TestCase
|
|||
assert_equal(nil, s3.rstrip!)
|
||||
assert_equal(" \u3042", s3)
|
||||
|
||||
s4 = S("\u3042")
|
||||
assert_equal(nil, s4.rstrip!)
|
||||
assert_equal("\u3042", s4)
|
||||
|
||||
assert_raise(Encoding::CompatibilityError) { "\u3042".encode("ISO-2022-JP").rstrip! }
|
||||
end
|
||||
|
||||
|
@ -2175,6 +2179,10 @@ class TestString < Test::Unit::TestCase
|
|||
s3 = S(" \u3042")
|
||||
assert_equal("\u3042", s3.lstrip!)
|
||||
assert_equal("\u3042", s3)
|
||||
|
||||
s4 = S("\u3042")
|
||||
assert_equal(nil, s4.lstrip!)
|
||||
assert_equal("\u3042", s4)
|
||||
end
|
||||
|
||||
=begin
|
||||
|
|
Загрузка…
Ссылка в новой задаче