mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_cstr.rb: failed encoding name
* test/-ext-/string/test_cstr.rb (test_wchar_long): show the failed encoding name in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8cbf4003db
commit
bf74f633c5
1 changed files with 3 additions and 3 deletions
|
@ -33,10 +33,10 @@ class Test_StringCStr < Test::Unit::TestCase
|
||||||
len = str.size * n
|
len = str.size * n
|
||||||
WCHARS.each do |enc|
|
WCHARS.each do |enc|
|
||||||
s = Bug::String.new(str.encode(enc))*n
|
s = Bug::String.new(str.encode(enc))*n
|
||||||
assert_nothing_raised(ArgumentError) {s.cstr_term}
|
assert_nothing_raised(ArgumentError, enc.name) {s.cstr_term}
|
||||||
s.set_len(s.bytesize / 2)
|
s.set_len(s.bytesize / 2)
|
||||||
assert_equal(len / 2, s.size)
|
assert_equal(len / 2, s.size, enc.name)
|
||||||
assert_equal(0, s.cstr_term)
|
assert_equal(0, s.cstr_term, enc.name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue