1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_string.rb(test_chr): added test for String#chr

[fix GH-1179]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2016-01-05 12:44:55 +00:00
parent 2c62030c51
commit e2191d4ce6
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Tue Jan 5 21:43:50 2016 Kuniaki IGARASHI <igaiga@gmail.com>
* test/ruby/test_string.rb(test_chr): added test for String#chr
[fix GH-1179]
Tue Jan 5 21:32:26 2016 Kuniaki IGARASHI <igaiga@gmail.com>
* test/ruby/test_numeric.rb (test_nonzero_p): added test for String#nonzero?

View file

@ -2349,6 +2349,13 @@ class TestString < Test::Unit::TestCase
assert_equal(0x3042, "\u3042\u3043".ord)
assert_raise(ArgumentError) { "".ord }
end
def test_chr
assert_equal("a", "abcde".chr)
assert_equal("a", "a".chr)
assert_equal("\u3042", "\u3042\u3043".chr)
assert_equal('', ''.chr)
end
end
class TestString2 < TestString