This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/flutter_tools/test/commands.shard/permeable Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1921,14 +1921,17 @@ void main() {
19211921
19221922 // Run pub online first in order to populate the pub cache.
19231923 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+ )));
19261928
19271929 // Run pub offline.
19281930 loggingProcessManager.clear ();
19291931 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+ )));
19321935 },
19331936 overrides: < Type , Generator > {
19341937 ProcessManager : () => loggingProcessManager,
You can’t perform that action at this time.
0 commit comments