mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
envutil.rb: use **opt
* test/ruby/envutil.rb: use **opt to call invoke_ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
96399a0c5f
commit
29736fab40
1 changed files with 4 additions and 4 deletions
|
@ -215,7 +215,7 @@ module Test
|
|||
else
|
||||
child_env = []
|
||||
end
|
||||
out, _, status = EnvUtil.invoke_ruby(child_env + %W'-W0', testsrc, true, :merge_to_stdout, opt)
|
||||
out, _, status = EnvUtil.invoke_ruby(child_env + %W'-W0', testsrc, true, :merge_to_stdout, **opt)
|
||||
assert !status.signaled?, FailDesc[status, message, out]
|
||||
end
|
||||
|
||||
|
@ -246,7 +246,7 @@ module Test
|
|||
end
|
||||
|
||||
def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil, **opt)
|
||||
stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, opt)
|
||||
stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, **opt)
|
||||
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 != []
|
||||
|
@ -271,7 +271,7 @@ module Test
|
|||
end
|
||||
|
||||
def assert_ruby_status(args, test_stdin="", message=nil, **opt)
|
||||
out, _, status = EnvUtil.invoke_ruby(args, test_stdin, true, :merge_to_stdout, opt)
|
||||
out, _, status = EnvUtil.invoke_ruby(args, test_stdin, true, :merge_to_stdout, **opt)
|
||||
assert(!status.signaled?, FailDesc[status, message, out])
|
||||
message ||= "ruby exit status is not success:"
|
||||
assert(status.success?, "#{message} (#{status.inspect})")
|
||||
|
@ -299,7 +299,7 @@ module Test
|
|||
eom
|
||||
args = args.dup
|
||||
args.insert((Hash === args.first ? 1 : 0), *$:.map {|l| "-I#{l}"})
|
||||
stdout, stderr, status = EnvUtil.invoke_ruby(args, src, true, true, opt)
|
||||
stdout, stderr, status = EnvUtil.invoke_ruby(args, src, true, true, **opt)
|
||||
abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
|
||||
assert(!abort, FailDesc[status, stderr])
|
||||
self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
|
||||
|
|
Loading…
Reference in a new issue