mirror of
https://github.com/flutter/packages.git
synced 2025-05-23 03:36:45 +08:00
[tools] adds 'android' alias for build-example script (#3656)
[tools] adds 'android' alias for build-example script
This commit is contained in:
@ -406,6 +406,34 @@ void main() {
|
||||
]));
|
||||
});
|
||||
|
||||
test('building for Android with alias', () async {
|
||||
final RepositoryPackage plugin = createFakePlugin('plugin', packagesDir,
|
||||
platformSupport: <String, PlatformDetails>{
|
||||
platformAndroid: const PlatformDetails(PlatformSupport.inline),
|
||||
});
|
||||
|
||||
final Directory pluginExampleDirectory = getExampleDir(plugin);
|
||||
|
||||
final List<String> output = await runCapturingPrint(runner, <String>[
|
||||
'build-examples',
|
||||
'--android',
|
||||
]);
|
||||
|
||||
expect(
|
||||
output,
|
||||
containsAllInOrder(<String>[
|
||||
'\nBUILDING plugin/example for Android (apk)',
|
||||
]),
|
||||
);
|
||||
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
orderedEquals(<ProcessCall>[
|
||||
ProcessCall(getFlutterCommand(mockPlatform),
|
||||
const <String>['build', 'apk'], pluginExampleDirectory.path),
|
||||
]));
|
||||
});
|
||||
|
||||
test('enable-experiment flag for Android', () async {
|
||||
final RepositoryPackage plugin = createFakePlugin('plugin', packagesDir,
|
||||
platformSupport: <String, PlatformDetails>{
|
||||
|
Reference in New Issue
Block a user