aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-05 08:32:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-05 08:32:49 +0000
commitdb95dfbc0024d8a10e1a806e00c8fd3e1324996c (patch)
treef31ec0bc2c8696eca9458085dfa47102e21c65ba /test
parent750b52f4bea92cf6c8cbdce5ad793d7944c8e582 (diff)
downloadruby-db95dfbc0024d8a10e1a806e00c8fd3e1324996c.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_econv.rb15
1 files changed, 4 insertions, 11 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index 91c0792c33..72a5af5334 100644
--- a/test/ruby/test_econv.rb
+++ b/test/ruby/test_econv.rb
@@ -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