mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Closes https://github.com/flutter/flutter/issues/160673. Does the following: - Renames `FlutterProjectType` to `FlutterTemplateType`; did some enhanced enum cleanups while at it - Creates a hierarchy of `RemovedFlutterTemplateType` from `ParsedFlutterTemplateType` - Removes the `skeleton` directory - Merges `app_shared` back into `app` (no longer required now that `skeleton` is removed) Final cleanups are tracked in https://github.com/flutter/flutter/issues/160692. (Added @zanderso just to spot check this is what he meant by https://github.com/flutter/flutter/issues/160673#issuecomment-2557742347)
45 lines
1.3 KiB
Dart
45 lines
1.3 KiB
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:file/file.dart';
|
|
import 'package:flutter_tools/src/base/io.dart';
|
|
import 'package:flutter_tools/src/globals.dart' as globals;
|
|
|
|
import '../src/common.dart';
|
|
import '../src/context.dart';
|
|
import '../src/test_flutter_command_runner.dart';
|
|
import 'test_utils.dart';
|
|
|
|
void main() {
|
|
group('pass analyze template:', () {
|
|
final List<String> templates = <String>['app', 'module', 'package', 'plugin', 'plugin_ffi'];
|
|
late Directory tempDir;
|
|
|
|
setUp(() {
|
|
tempDir = globals.fs.systemTempDirectory.createTempSync(
|
|
'flutter_tools_analyze_all_template.',
|
|
);
|
|
});
|
|
|
|
tearDown(() {
|
|
tryToDelete(tempDir);
|
|
});
|
|
|
|
for (final String template in templates) {
|
|
testUsingContext('analysis for $template', () async {
|
|
final String projectPath = await createProject(
|
|
tempDir,
|
|
arguments: <String>['--no-pub', '--template', template],
|
|
);
|
|
final ProcessResult result = await globals.processManager.run(<String>[
|
|
'flutter',
|
|
'analyze',
|
|
], workingDirectory: projectPath);
|
|
|
|
expect(result, const ProcessResultMatcher());
|
|
});
|
|
}
|
|
});
|
|
}
|