Chromium Code Reviews| Index: tools/testing/dart/test_options.dart |
| diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart |
| index 00e4a9b7cbfcb8082ab70074abe2c87fc527f89c..de74fc48c3941cc9275148208fb30d3861b9e30f 100644 |
| --- a/tools/testing/dart/test_options.dart |
| +++ b/tools/testing/dart/test_options.dart |
| @@ -145,11 +145,15 @@ class TestOptionsParser { |
| } |
| value = arguments[++i]; |
| } else { |
| - // The option name does not start with '-' or '--' so we |
| - // assume that the rest of the arguments specify tests or test |
| - // suites to run. |
| - configuration['patterns'] = arguments.getRange(i, numArguments - i); |
| - return _expandConfigurations(configuration); |
| + // The argument does not start with '-' or '--' and is |
| + // therefore not an option. We use it as a test selection |
| + // pattern. |
| + var patterns = configuration['patterns']; |
| + if (patterns == null) { |
| + configuration['patterns'] = patterns = new List(); |
| + } |
| + patterns.add(arg); |
| + continue; |
|
Bill Hesse
2011/11/17 09:17:53
Nice. I was thinking that it is annoying not to a
|
| } |
| // Find the option specification for the name. |
| var spec = _getSpecification(name); |
| @@ -215,6 +219,7 @@ class TestOptionsParser { |
| patterns = new List.from(defaultTestSelectors); |
| } |
| for (var i = 0; i < patterns.length; i++) { |
| + if (patterns[i] is RegExp) continue; |
| patterns[i] = patterns[i].replaceAll('*', '.*'); |
| patterns[i] = patterns[i].replaceAll('/', '.*'); |
| patterns[i] = new RegExp(patterns[i]); |