Commit 96e806ff authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1723 from akuroda/string_test_cap_down

add tests for String#capitalize!, String#downcase!, and String#upcase!
parents 36e234aa 61523d0e
...@@ -125,6 +125,7 @@ assert('String#capitalize!', '15.2.10.5.8') do ...@@ -125,6 +125,7 @@ assert('String#capitalize!', '15.2.10.5.8') do
a.capitalize! a.capitalize!
assert_equal 'Abc', a assert_equal 'Abc', a
assert_equal nil, 'Abc'.capitalize!
end end
assert('String#chomp', '15.2.10.5.9') do assert('String#chomp', '15.2.10.5.9') do
...@@ -204,6 +205,7 @@ assert('String#downcase!', '15.2.10.5.14') do ...@@ -204,6 +205,7 @@ assert('String#downcase!', '15.2.10.5.14') do
a.downcase! a.downcase!
assert_equal 'abc', a assert_equal 'abc', a
assert_equal nil, 'abc'.downcase!
end end
assert('String#each_line', '15.2.10.5.15') do assert('String#each_line', '15.2.10.5.15') do
...@@ -442,6 +444,7 @@ assert('String#upcase!', '15.2.10.5.43') do ...@@ -442,6 +444,7 @@ assert('String#upcase!', '15.2.10.5.43') do
a.upcase! a.upcase!
assert_equal 'ABC', a assert_equal 'ABC', a
assert_equal nil, 'ABC'.upcase!
end end
# Not ISO specified # Not ISO specified
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment