1
0
Fork 0
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:
nobu 2012-10-11 06:50:31 +00:00
parent 88e326edda
commit 104d173752

View file

@ -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"