ruby-changes:57985
From: Nobuyoshi <ko1@a...>
Date: Fri, 27 Sep 2019 21:17:29 +0900 (JST)
Subject: [ruby-changes:57985] 03284fb911 (master): assert_in_out_err should use FailDesc too
https://git.ruby-lang.org/ruby.git/commit/?id=03284fb911 From 03284fb91151bff5e12f1b7d5cdb0589f1ee43fb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 27 Sep 2019 21:07:53 +0900 Subject: assert_in_out_err should use FailDesc too diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb index 38201ca..6e564c9 100644 --- a/tool/lib/test/unit/core_assertions.rb +++ b/tool/lib/test/unit/core_assertions.rb @@ -52,15 +52,13 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit/core_assertions.rb#L52 args = Array(args).dup args.insert((Hash === args[0] ? 1 : 0), '--disable=gems') stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, **opt) - if signo = status.termsig - EnvUtil.diagnostic_reports(Signal.signame(signo), status.pid, Time.now) - end + desc = FailDesc[status, message, stderr] if block_given? raise "test_stdout ignored, use block only or without block" if test_stdout != [] raise "test_stderr ignored, use block only or without block" if test_stderr != [] yield(stdout.lines.map {|l| l.chomp }, stderr.lines.map {|l| l.chomp }, status) else - all_assertions(message) do |a| + all_assertions(desc) do |a| [["stdout", test_stdout, stdout], ["stderr", test_stderr, stderr]].each do |key, exp, act| a.for(key) do if exp.is_a?(Regexp) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/