зеркало из https://github.com/github/ruby.git
test_transcode.rb: add messages
* test/ruby/test_transcode.rb (test_valid_dummy_encoding): add assertion messages and suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
41d42a5937
Коммит
45379828f7
|
@ -2085,10 +2085,10 @@ class TestTranscode < Test::Unit::TestCase
|
|||
bug9314 = '[ruby-core:59354] [Bug #9314]'
|
||||
assert_separately(%W[- -- #{bug9314}], <<-'end;')
|
||||
bug = ARGV.shift
|
||||
result = assert_nothing_raised(TypeError) {break "test".encode(Encoding::UTF_16)}
|
||||
assert_equal("\xFE\xFF\x00t\x00e\x00s\x00t", result.b)
|
||||
result = assert_nothing_raised(TypeError) {break "test".encode(Encoding::UTF_32)}
|
||||
assert_equal("\x00\x00\xFE\xFF\x00\x00\x00t\x00\x00\x00e\x00\x00\x00s\x00\x00\x00t", result.b)
|
||||
result = assert_nothing_raised(TypeError, bug) {break "test".encode(Encoding::UTF_16)}
|
||||
assert_equal("\xFE\xFF\x00t\x00e\x00s\x00t", result.b, bug)
|
||||
result = assert_nothing_raised(TypeError, bug) {break "test".encode(Encoding::UTF_32)}
|
||||
assert_equal("\x00\x00\xFE\xFF\x00\x00\x00t\x00\x00\x00e\x00\x00\x00s\x00\x00\x00t", result.b, bug)
|
||||
end;
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче