Unverified Commit 23d705c3 authored by Alex Melnyk's avatar Alex Melnyk Committed by GitHub

Fix typo in create.dart (#82454)

parent 3bd14e78
......@@ -483,7 +483,7 @@ void _printPluginDirectoryLocationMessage(String pluginPath, String projectName,
Your plugin code is in $relativePluginMain.
You example app code is in $relativeExampleMain.
Your example app code is in $relativeExampleMain.
''');
if (platformsString != null && platformsString.isNotEmpty) {
......
......@@ -2203,6 +2203,25 @@ void main() {
FeatureFlags: () => TestFeatureFlags(isMacOSEnabled: true),
});
testUsingContext('flutter create . on and existing plugin should show "Your example app code in"', () async {
Cache.flutterRoot = '../..';
final CreateCommand command = CreateCommand();
final CommandRunner<void> runner = createTestCommandRunner(command);
final String projectDirPath = globals.fs.path.normalize(projectDir.absolute.path);
final String relativePluginPath = globals.fs.path.normalize(globals.fs.path.relative(projectDirPath));
final String relativeExamplePath = globals.fs.path.normalize(globals.fs.path.join(relativePluginPath, 'example/lib/main.dart'));
await runner.run(<String>['create', '--no-pub', '--org=com.example', '--template=plugin', '--platforms=android', projectDir.path]);
expect(logger.statusText, contains('Your example app code is in $relativeExamplePath.\n'));
await runner.run(<String>['create', '--no-pub', '--org=com.example', '--template=plugin', '--platforms=ios', projectDir.path]);
expect(logger.statusText, contains('Your example app code is in $relativeExamplePath.\n'));
await runner.run(<String>['create', '--no-pub', projectDir.path]);
expect(logger.statusText, contains('Your example app code is in $relativeExamplePath.\n'));
}, overrides: <Type, Generator> {
Logger: () => logger,
});
testUsingContext('flutter create -t plugin in an empty folder should not show pubspec.yaml updating suggestion', () async {
Cache.flutterRoot = '../..';
......
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