зеркало из https://github.com/github/ruby.git
* 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:
Родитель
2c62030c51
Коммит
e2191d4ce6
|
@ -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>
|
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?
|
* test/ruby/test_numeric.rb (test_nonzero_p): added test for String#nonzero?
|
||||||
|
|
|
@ -2349,6 +2349,13 @@ class TestString < Test::Unit::TestCase
|
||||||
assert_equal(0x3042, "\u3042\u3043".ord)
|
assert_equal(0x3042, "\u3042\u3043".ord)
|
||||||
assert_raise(ArgumentError) { "".ord }
|
assert_raise(ArgumentError) { "".ord }
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
class TestString2 < TestString
|
class TestString2 < TestString
|
||||||
|
|
Загрузка…
Ссылка в новой задаче