Add --empty to the flutter create command (#113873)
This commit is contained in:
@@ -1944,6 +1944,28 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
testUsingContext('can create an empty application project', () async {
|
||||
await _createAndAnalyzeProject(
|
||||
projectDir,
|
||||
<String>['--no-pub', '--empty'],
|
||||
<String>[
|
||||
'lib/main.dart',
|
||||
'flutter_project.iml',
|
||||
'android/app/src/main/AndroidManifest.xml',
|
||||
'ios/Flutter/AppFrameworkInfo.plist',
|
||||
],
|
||||
unexpectedPaths: <String>['test'],
|
||||
);
|
||||
expect(projectDir.childDirectory('lib').childFile('main.dart').readAsStringSync(),
|
||||
contains("Text('Hello World!')"));
|
||||
expect(projectDir.childDirectory('lib').childFile('main.dart').readAsStringSync(),
|
||||
isNot(contains('int _counter')));
|
||||
expect(projectDir.childFile('analysis_options.yaml').readAsStringSync(),
|
||||
isNot(contains('#')));
|
||||
expect(projectDir.childFile('README.md').readAsStringSync(),
|
||||
isNot(contains('Getting Started')));
|
||||
});
|
||||
|
||||
testUsingContext('can create a sample-based project', () async {
|
||||
await _createAndAnalyzeProject(
|
||||
projectDir,
|
||||
|
||||
Reference in New Issue
Block a user