Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: pkg/analyzer_cli/test/driver_test.dart

Issue 2541933002: update analyzer cli to support include directive in analysis options file (Closed)
Patch Set: merge Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer_cli/test/data/options_include_directive_tests_project/pkg/foo/lib/foo_package_options.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/driver_test.dart
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index 222d96d63be146747106964103e969b297cd1092..f582e59cdb4ddbd42662a9250740b415c257fbd1 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -306,6 +306,25 @@ linter:
createTests('old', AnalysisEngine.ANALYSIS_OPTIONS_FILE);
createTests('new', AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+
+ test('include directive', () {
+ String testDir = path.join(
+ testDirectory, 'data', 'options_include_directive_tests_project');
+ drive(
+ path.join(testDir, 'lib', 'test_file.dart'),
+ args: [
+ '--fatal-warnings',
+ '--packages',
+ path.join(testDir, '_packages'),
+ ],
+ options: path.join(testDir, '.analysis_options'),
+ );
+ expect(exitCode, 3);
+ expect(outSink.toString(),
+ contains('but doesn\'t end with a return statement.'));
+ expect(outSink.toString(), contains('isn\'t defined'));
+ expect(outSink.toString(), contains('Avoid empty else statements.'));
+ });
});
void createTests(String designator, String optionsFileName) {
« no previous file with comments | « pkg/analyzer_cli/test/data/options_include_directive_tests_project/pkg/foo/lib/foo_package_options.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698