@@ -112,32 +112,27 @@ Future<void> main(List<String> args) async {
112
112
parser, "Must provide at least one flag for an operation to perform." );
113
113
}
114
114
115
- if (results.rest.length != 1 ) {
116
- _usageError (
117
- parser, "Must provide a file path or glob for which tests to update." );
118
- }
119
-
120
- var result = results.rest.single;
121
-
122
- // Allow tests to be specified without the extension for compatibility with
123
- // the regular test runner syntax.
124
- if (! result.endsWith (".dart" )) {
125
- result += ".dart" ;
126
- }
115
+ for (var result in results.rest) {
116
+ // Allow tests to be specified without the extension for compatibility with
117
+ // the regular test runner syntax.
118
+ if (! result.endsWith (".dart" )) {
119
+ result += ".dart" ;
120
+ }
127
121
128
- // Allow tests to be specified either relative to the "tests" directory
129
- // or relative to the current directory.
130
- var root = result.startsWith ("tests" ) ? "." : "tests" ;
131
- var glob = Glob (result, recursive: true );
132
- for (var entry in glob.listSync (root: root)) {
133
- if (! entry.path.endsWith (".dart" )) continue ;
134
-
135
- if (entry is pkg_file.File ) {
136
- await _processFile (entry,
137
- dryRun: dryRun,
138
- includeContext: includeContext,
139
- remove: removeSources,
140
- insert: insertSources);
122
+ // Allow tests to be specified either relative to the "tests" directory
123
+ // or relative to the current directory.
124
+ var root = result.startsWith ("tests" ) ? "." : "tests" ;
125
+ var glob = Glob (result, recursive: true );
126
+ for (var entry in glob.listSync (root: root)) {
127
+ if (! entry.path.endsWith (".dart" )) continue ;
128
+
129
+ if (entry is pkg_file.File ) {
130
+ await _processFile (entry,
131
+ dryRun: dryRun,
132
+ includeContext: includeContext,
133
+ remove: removeSources,
134
+ insert: insertSources);
135
+ }
141
136
}
142
137
}
143
138
}
0 commit comments