Unverified Commit 5d587f95 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_conductor] Refactor next command (#91768)

parent 7a7d9a27
This diff is collapsed.
......@@ -1052,6 +1052,34 @@ void main() {
}, onPlatform: <String, dynamic>{
'windows': const Skip('Flutter Conductor only supported on macos/linux'),
});
group('prompt', () {
test('throws if user inputs character that is not "y" or "n"', () {
final FileSystem fileSystem = MemoryFileSystem.test();
final TestStdio stdio = TestStdio(
stdin: <String>['x'],
verbose: true,
);
final Checkouts checkouts = Checkouts(
fileSystem: fileSystem,
parentDirectory: fileSystem.directory('/'),
platform: FakePlatform(),
processManager: FakeProcessManager.empty(),
stdio: stdio,
);
final NextContext context = NextContext(
autoAccept: false,
force: false,
checkouts: checkouts,
stateFile: fileSystem.file('/statefile.json'),
);
expect(
() => context.prompt('Asking a question?', stdio),
throwsExceptionWith('Unknown user input (expected "y" or "n")'),
);
});
});
}
void _initializeCiYamlFile(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment