[Windows] Add a flutter run console output test (#116626)

Adds a test to verify the console output of `flutter run --release` on Windows.

Part of: https://github.com/flutter/flutter/issues/111577
This commit is contained in:
Loïc Sharma
2022-12-08 14:05:53 -08:00
committed by GitHub
parent 003608f182
commit bebea0cc6c
19 changed files with 1130 additions and 2 deletions

View File

@@ -26,6 +26,14 @@ TaskFunction createMacOSRunReleaseTest() {
);
}
TaskFunction createWindowsRunReleaseTest() {
return DesktopRunOutputTest(
'${flutterDirectory.path}/dev/integration_tests/ui',
'lib/empty.dart',
release: true,
);
}
class AndroidRunOutputTest extends RunOutputTask {
AndroidRunOutputTest({required super.release}) : super(
'${flutterDirectory.path}/dev/integration_tests/ui',
@@ -130,9 +138,9 @@ class DesktopRunOutputTest extends RunOutputTask {
TaskResult verify(List<String> stdout, List<String> stderr) {
_findNextMatcherInList(
stdout,
(String line) => line.startsWith('Launching lib/main.dart on ') &&
(String line) => line.startsWith('Launching $testTarget on ') &&
line.endsWith(' in ${release ? 'release' : 'debug'} mode...'),
'Launching lib/main.dart on',
'Launching $testTarget on',
);
_findNextMatcherInList(