diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-16 11:18:06 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-16 11:18:06 +0000 |
commit | 53da7250ed09b2c154591870804ab4c98b64b053 (patch) | |
tree | c8281065bbe58a018836d7dad28ebf0c93c4d8cb /test/ruby/envutil.rb | |
parent | 0d88cd9394ecbcef0c733f7973504d6ff49db228 (diff) | |
download | ruby-53da7250ed09b2c154591870804ab4c98b64b053.tar.gz |
* test/ruby/envutil.rb (assert_pattern_list): Show number of matched
patterns and characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r-- | test/ruby/envutil.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 4d76a504af..f5fbb7c10b 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -485,7 +485,7 @@ eom def assert_pattern_list(pattern_list, actual, message=nil) rest = actual anchored = true - pattern_list.each {|pattern| + pattern_list.each_with_index {|pattern, i| if pattern == :* anchored = false else @@ -506,6 +506,7 @@ eom else actual_mesg = "to match #{mu_pp rest}" end + actual_mesg << "\nafter #{i} patterns with #{actual.length - rest.length} characters" expect_msg + actual_mesg } assert false, msg |