envutil.rb: improve by assert_pattern_list
* test/lib/envutil.rb (assert_in_out_err): improve to match by assert_pattern_list if expected result is other than Regexp or String list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e9ff9e79e4
commit
f73a92e46b
@ -344,8 +344,10 @@ module Test
|
|||||||
begin
|
begin
|
||||||
if exp.is_a?(Regexp)
|
if exp.is_a?(Regexp)
|
||||||
assert_match(exp, act, message)
|
assert_match(exp, act, message)
|
||||||
else
|
elsif exp.all? {|e| String === e}
|
||||||
assert_equal(exp, act.lines.map {|l| l.chomp }, message)
|
assert_equal(exp, act.lines.map {|l| l.chomp }, message)
|
||||||
|
else
|
||||||
|
assert_pattern_list(exp, act, message)
|
||||||
end
|
end
|
||||||
rescue MiniTest::Assertion => e
|
rescue MiniTest::Assertion => e
|
||||||
errs << e.message
|
errs << e.message
|
||||||
|
Loading…
x
Reference in New Issue
Block a user