mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_string.rb: missing test
* test/ruby/test_string.rb (test_each_codepoint): missing test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
88e326edda
commit
104d173752
1 changed files with 6 additions and 0 deletions
|
@ -633,6 +633,12 @@ class TestString < Test::Unit::TestCase
|
|||
assert_equal(67, res[2])
|
||||
end
|
||||
|
||||
def test_each_codepoint
|
||||
res = []
|
||||
S("ABC").codepoints.each {|x| res << x}
|
||||
assert_equal([65, 66, 67], res)
|
||||
end
|
||||
|
||||
def test_each_line
|
||||
save = $/
|
||||
$/ = "\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue