Fix typo in create.dart (#82454)
This commit is contained in:
@@ -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 = '../..';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user