From 104d173752b240dd9a52a4edf2f3715f540e629a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Oct 2012 06:50:31 +0000 Subject: 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 --- test/ruby/test_string.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 823c5c7c6d..2beaef3504 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -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" -- cgit v1.2.3