1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_transcode.rb: base encoding

* test/ruby/test_transcode.rb (TestTranscode#test_pseudo_encoding_inspect):
  test for proper base encoding.  [ruby-core:57318] [Bug #8940]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-09-23 15:02:50 +00:00
parent 3a2aca5075
commit e29c3bfb9f

View file

@ -2068,6 +2068,7 @@ class TestTranscode < Test::Unit::TestCase
%w[UTF-32 UTF-16].each do |enc|
define_method("test_pseudo_encoding_inspect(#{enc})") do
assert_normal_exit("'aaa'.encode('#{enc}').inspect", bug8940)
assert_equal(4, 'aaa'.encode(enc).length, "should count in #{enc} with BOM")
end
end
end