summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-03 08:19:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-03 08:19:39 +0000
commitf73a92e46ba315a641da48ea0ccf09f0d228509d (patch)
treef695016ed12f743f1a25f4fda8dad074d16f9351 /test
parente9ff9e79e4f32a71be8ad8d630b67de300ac2b36 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/lib/envutil.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb
index 71d00b93806..8d4dc707c7c 100644
--- a/test/lib/envutil.rb
+++ b/test/lib/envutil.rb
@@ -344,8 +344,10 @@ module Test
begin
if exp.is_a?(Regexp)
assert_match(exp, act, message)
- else
+ elsif exp.all? {|e| String === e}
assert_equal(exp, act.lines.map {|l| l.chomp }, message)
+ else
+ assert_pattern_list(exp, act, message)
end
rescue MiniTest::Assertion => e
errs << e.message