mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_econv.rb: assert_separately
* test/ruby/test_econv.rb (test_default_external): use assert_separately for clearer messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
750b52f4be
commit
db95dfbc00
1 changed files with 4 additions and 11 deletions
|
@ -911,21 +911,14 @@ class TestEncodingConverter < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_default_external
|
||||
cmd = <<EOS
|
||||
Encoding.list.grep(->(enc) {/\AISO-8859-\d+\z/i =~ enc.name}) do |enc|
|
||||
assert_separately(%W[--disable=gems -d - #{enc.name}], <<-EOS, ignore_stderr: true)
|
||||
Encoding.default_external = ext = ARGV[0]
|
||||
Encoding.default_internal = int ='utf-8'
|
||||
begin
|
||||
assert_nothing_raised do
|
||||
Encoding::Converter.new(ext, int)
|
||||
ensure
|
||||
Marshal.dump($!, STDOUT)
|
||||
STDOUT.flush
|
||||
end
|
||||
EOS
|
||||
Encoding.list.grep(->(enc) {/\AISO-8859-\d+\z/i =~ enc.name}) do |enc|
|
||||
error = IO.popen([EnvUtil.rubybin, "-e", cmd, enc.name, err: File::NULL]) do |child|
|
||||
Marshal.load(child)
|
||||
end
|
||||
assert_nil(error)
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue