File tree 1 file changed +7
-4
lines changed
packages/flutter_tools/test/commands.shard/permeable
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1921,14 +1921,17 @@ void main() {
1921
1921
1922
1922
// Run pub online first in order to populate the pub cache.
1923
1923
await runner.run (< String > ['create' , '--pub' , projectDir.path]);
1924
- expect (loggingProcessManager.commands.first, contains (matches (r'dart-sdk[\\/]bin[\\/]dart' )));
1925
- expect (loggingProcessManager.commands.first, isNot (contains ('--offline' )));
1924
+ final RegExp dartCommand = RegExp (r'dart-sdk[\\/]bin[\\/]dart' );
1925
+ expect (loggingProcessManager.commands, contains (predicate (
1926
+ (List <String > c) => dartCommand.hasMatch (c[0 ]) && c[1 ].contains ('pub' ) && ! c.contains ('--offline' )
1927
+ )));
1926
1928
1927
1929
// Run pub offline.
1928
1930
loggingProcessManager.clear ();
1929
1931
await runner.run (< String > ['create' , '--pub' , '--offline' , projectDir.path]);
1930
- expect (loggingProcessManager.commands.first, contains (matches (r'dart-sdk[\\/]bin[\\/]dart' )));
1931
- expect (loggingProcessManager.commands.first, contains ('--offline' ));
1932
+ expect (loggingProcessManager.commands, contains (predicate (
1933
+ (List <String > c) => dartCommand.hasMatch (c[0 ]) && c[1 ].contains ('pub' ) && c.contains ('--offline' )
1934
+ )));
1932
1935
},
1933
1936
overrides: < Type , Generator > {
1934
1937
ProcessManager : () => loggingProcessManager,
You can’t perform that action at this time.
0 commit comments