mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
41d42a5937
commit
45379828f7
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue