mirror of
https://github.com/dart-lang/sdk
synced 2024-07-08 12:06:26 +00:00
[test_runner] Support multiple arguments in update_static_error_tests.dart
This improves usability of the tool when a multiple tests needs updating. Change-Id: I034e3da7381ae79b2149429e5271904e0dfcae59 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210862 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
89ba203a8d
commit
184fd50728
|
@ -112,13 +112,7 @@ Future<void> main(List<String> args) async {
|
||||||
parser, "Must provide at least one flag for an operation to perform.");
|
parser, "Must provide at least one flag for an operation to perform.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (results.rest.length != 1) {
|
for (var result in results.rest) {
|
||||||
_usageError(
|
|
||||||
parser, "Must provide a file path or glob for which tests to update.");
|
|
||||||
}
|
|
||||||
|
|
||||||
var result = results.rest.single;
|
|
||||||
|
|
||||||
// Allow tests to be specified without the extension for compatibility with
|
// Allow tests to be specified without the extension for compatibility with
|
||||||
// the regular test runner syntax.
|
// the regular test runner syntax.
|
||||||
if (!result.endsWith(".dart")) {
|
if (!result.endsWith(".dart")) {
|
||||||
|
@ -140,6 +134,7 @@ Future<void> main(List<String> args) async {
|
||||||
insert: insertSources);
|
insert: insertSources);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _usageError(ArgParser parser, String message) {
|
void _usageError(ArgParser parser, String message) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user