зеркало из https://github.com/github/ruby.git
support multi-run for test/ruby/test_encoding.rb
Unique encoding name is required.
This commit is contained in:
Родитель
14759e6907
Коммит
5f7be6243a
|
@ -56,8 +56,8 @@ class TestEncoding < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_replicate
|
||||
assert_instance_of(Encoding, Encoding::UTF_8.replicate('UTF-8-ANOTHER'))
|
||||
assert_instance_of(Encoding, Encoding::ISO_2022_JP.replicate('ISO-2022-JP-ANOTHER'))
|
||||
assert_instance_of(Encoding, Encoding::UTF_8.replicate("UTF-8-ANOTHER#{Time.now.to_f}"))
|
||||
assert_instance_of(Encoding, Encoding::ISO_2022_JP.replicate("ISO-2022-JP-ANOTHER#{Time.now.to_f}"))
|
||||
bug3127 = '[ruby-dev:40954]'
|
||||
assert_raise(TypeError, bug3127) {Encoding::UTF_8.replicate(0)}
|
||||
assert_raise(ArgumentError, bug3127) {Encoding::UTF_8.replicate("\0")}
|
||||
|
|
Загрузка…
Ссылка в новой задаче