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
|
else
|
||||||
child_env = []
|
child_env = []
|
||||||
end
|
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]
|
assert !status.signaled?, FailDesc[status, message, out]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ module Test
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil, **opt)
|
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?
|
if block_given?
|
||||||
raise "test_stdout ignored, use block only or without block" if test_stdout != []
|
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 != []
|
raise "test_stderr ignored, use block only or without block" if test_stderr != []
|
||||||
|
@ -271,7 +271,7 @@ module Test
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_ruby_status(args, test_stdin="", message=nil, **opt)
|
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])
|
assert(!status.signaled?, FailDesc[status, message, out])
|
||||||
message ||= "ruby exit status is not success:"
|
message ||= "ruby exit status is not success:"
|
||||||
assert(status.success?, "#{message} (#{status.inspect})")
|
assert(status.success?, "#{message} (#{status.inspect})")
|
||||||
|
@ -299,7 +299,7 @@ module Test
|
||||||
eom
|
eom
|
||||||
args = args.dup
|
args = args.dup
|
||||||
args.insert((Hash === args.first ? 1 : 0), *$:.map {|l| "-I#{l}"})
|
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))
|
abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
|
||||||
assert(!abort, FailDesc[status, stderr])
|
assert(!abort, FailDesc[status, stderr])
|
||||||
self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
|
self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
|
||||||
|
|
Loading…
Reference in a new issue