| Index: test/driver_test.dart
|
| diff --git a/test/driver_test.dart b/test/driver_test.dart
|
| index e676d4c873fecd8f4600f9344e368df397625ebc..0e9795e9f89c2b59b9d19092f941cca11fb57f86 100644
|
| --- a/test/driver_test.dart
|
| +++ b/test/driver_test.dart
|
| @@ -35,15 +35,26 @@ main() {
|
| });
|
|
|
| group('linter', () {
|
| - test('gets analysis options', () {
|
| - Driver driver = new Driver();
|
| + StringSink savedOutSink;
|
| + Driver driver;
|
| +
|
| + setUp(() {
|
| + savedOutSink = outSink;
|
| + outSink = new StringBuffer();
|
| +
|
| + driver = new Driver();
|
| driver.start([
|
| '--options',
|
| 'test/data/linter_project/.analysis_options',
|
| '--lints',
|
| 'test/data/linter_project/test_file.dart'
|
| ]);
|
| + });
|
| + tearDown(() {
|
| + outSink = savedOutSink;
|
| + });
|
|
|
| + test('gets analysis options', () {
|
| /// Lints should be enabled.
|
| expect(driver.context.analysisOptions.lint, isTrue);
|
|
|
| @@ -51,6 +62,11 @@ main() {
|
| var lintNames = linterPlugin.lintRules.map((r) => r.name);
|
| expect(lintNames, orderedEquals(['camel_case_types']));
|
| });
|
| +
|
| + test('generates lints', () {
|
| + expect(outSink.toString(),
|
| + contains('[lint] Name types using UpperCamelCase.'));
|
| + });
|
| });
|
|
|
| group('in temp directory', () {
|
| @@ -139,8 +155,8 @@ main() {}
|
| ]);
|
| expect(
|
| errorSink.toString(),
|
| - equals(
|
| - 'Plugin configuration skipped: Unrecognized plugin config format, expected `YamlMap`, got `YamlList` (line 2, column 4)\n'));
|
| + equals('Plugin configuration skipped: Unrecognized plugin config '
|
| + 'format, expected `YamlMap`, got `YamlList` (line 2, column 4)\n'));
|
| });
|
| test('plugin config', () {
|
| BootLoader loader = new BootLoader();
|
|
|