File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
packages/flutter_tools/test/integration.shard Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2014 The Flutter Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ import 'package:file/file.dart' ;
6+ import 'package:flutter_tools/src/base/io.dart' ;
7+ import 'package:flutter_tools/src/globals.dart' as globals;
8+
9+ import '../src/common.dart' ;
10+ import '../src/context.dart' ;
11+ import '../src/test_flutter_command_runner.dart' ;
12+
13+ void main () {
14+ group ('pass analyze template:' , () {
15+ final List <String > templates = < String > [
16+ 'app' ,
17+ 'module' ,
18+ 'package' ,
19+ 'plugin' ,
20+ 'plugin_ffi' ,
21+ 'skeleton' ,
22+ ];
23+ late Directory tempDir;
24+
25+ setUp (() {
26+ tempDir = globals.fs.systemTempDirectory
27+ .createTempSync ('flutter_tools_analyze_all_template.' );
28+ });
29+
30+ tearDown (() {
31+ tryToDelete (tempDir);
32+ });
33+
34+ for (final String template in templates) {
35+ testUsingContext ('analysis for $template ' , () async {
36+ final String projectPath = await createProject (tempDir,
37+ arguments: < String > ['--no-pub' , '--template' , template]);
38+ final ProcessResult result = await globals.processManager
39+ .run (< String > ['flutter' , 'analyze' ], workingDirectory: projectPath);
40+
41+ expect (result.exitCode, 0 );
42+ });
43+ }
44+ });
45+ }
You can’t perform that action at this time.
0 commit comments