[flutter_tools] support enable-experiment in flutter analyze (#54613)

This commit is contained in:
Jonah Williams
2020-04-13 16:00:03 -07:00
committed by GitHub
parent 9cb9bfbd7c
commit ee43de0476
11 changed files with 149 additions and 54 deletions

View File

@@ -28,6 +28,7 @@ class FakeCommand {
this.stdout = '',
this.stderr = '',
this.completer,
this.stdin,
}) : assert(command != null),
assert(duration != null),
assert(exitCode != null);
@@ -82,6 +83,10 @@ class FakeCommand {
/// resolves.
final Completer<void> completer;
/// An optional stdin sink that will be exposed through the resulting
/// [FakeProcess].
final IOSink stdin;
void _matches(List<String> command, String workingDirectory, Map<String, String> environment) {
expect(command, equals(this.command));
if (this.workingDirectory != null) {
@@ -198,7 +203,7 @@ abstract class FakeProcessManager implements ProcessManager {
fakeCommand.onRun,
_pid,
fakeCommand.stderr,
null, // stdin
fakeCommand.stdin,
fakeCommand.stdout,
fakeCommand.completer,
);