mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
Add test for String#lstrip!
* test/ruby/test_string.rb (TestString#test_lstrip_bang): Add test for String#lstrip!. [Fix GH-1176] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b8d9770b6c
commit
78d15f5e35
2 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Dec 28 09:18:53 2015 Kuniaki IGARASHI <igaiga@gmail.com>
|
||||||
|
|
||||||
|
* test/ruby/test_string.rb (TestString#test_lstrip_bang): Add test
|
||||||
|
for String#lstrip!. [Fix GH-1176]
|
||||||
|
|
||||||
Sun Dec 27 23:32:26 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
Sun Dec 27 23:32:26 2015 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||||
|
|
||||||
* ext/win32ole/win32ole.c (ole_variant2val): refactoring.
|
* ext/win32ole/win32ole.c (ole_variant2val): refactoring.
|
||||||
|
|
|
@ -2147,6 +2147,20 @@ class TestString < Test::Unit::TestCase
|
||||||
assert_equal("\u3042", " \u3042".lstrip)
|
assert_equal("\u3042", " \u3042".lstrip)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_lstrip_bang
|
||||||
|
s1 = S(" hello ")
|
||||||
|
assert_equal("hello ", s1.lstrip!)
|
||||||
|
assert_equal("hello ", s1)
|
||||||
|
|
||||||
|
s2 = S("\u3042 ")
|
||||||
|
assert_equal(nil, s2.lstrip!)
|
||||||
|
assert_equal("\u3042 ", s2)
|
||||||
|
|
||||||
|
s3 = S(" \u3042")
|
||||||
|
assert_equal("\u3042", s3.lstrip!)
|
||||||
|
assert_equal("\u3042", s3)
|
||||||
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
def test_symbol_table_overflow
|
def test_symbol_table_overflow
|
||||||
assert_in_out_err([], <<-INPUT, [], /symbol table overflow \(symbol [a-z]{8}\) \(RuntimeError\)/)
|
assert_in_out_err([], <<-INPUT, [], /symbol table overflow \(symbol [a-z]{8}\) \(RuntimeError\)/)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue