From 0ffb2b592c902827e50ec2d266b08fba2a691269 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 11 Oct 2015 22:18:58 +0200 Subject: [PATCH] test runner: prefix regex for "run.rb /re/" syntax with .* --- tests/run.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run.rb b/tests/run.rb index ddef5bf7c..4806d6971 100755 --- a/tests/run.rb +++ b/tests/run.rb @@ -52,7 +52,7 @@ def main elsif /^ (\d{3}) (?: - (\d{3}) )?$/x.match arg $1.to_i.upto(($2 || $1).to_i) { |idx| controller.add_test_case sprintf("%03d", idx) } elsif %r{^ / (.+) / $}ix.match arg - re = Regexp.new "^T_(\\d+)#{$1}", Regexp::IGNORECASE + re = Regexp.new "^T_(\\d+).*#{$1}", Regexp::IGNORECASE tests = controller.results.results.keys.collect { |e| re.match(e) ? $1 : nil }.compact error_and_exit "No tests matched RE #{re}" if tests.empty? tests.each { |e| controller.add_test_case e }