OLD | NEW |
1 import 'dart:async'; | 1 import 'dart:async'; |
2 import 'dart:io'; | 2 import 'dart:io'; |
3 | 3 |
4 import 'package:analyzer_cli/src/driver.dart' show Driver, outSink, errorSink; | 4 import 'package:analyzer_cli/src/driver.dart' show Driver, outSink, errorSink; |
5 import 'package:analyzer_cli/src/options.dart' show ExitHandler, exitHandler; | 5 import 'package:analyzer_cli/src/options.dart' show ExitHandler, exitHandler; |
6 import 'package:path/path.dart' as path; | 6 import 'package:path/path.dart' as path; |
7 import 'package:test/test.dart'; | 7 import 'package:test/test.dart'; |
8 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 8 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
9 | 9 |
10 import 'utils.dart' show recursiveCopy, testDirectory, withTempDirAsync; | 10 import 'utils.dart' show recursiveCopy, testDirectory, withTempDirAsync; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 outSink = _stdout; | 65 outSink = _stdout; |
66 errorSink = _stderr; | 66 errorSink = _stderr; |
67 exitHandler = (_) {}; | 67 exitHandler = (_) {}; |
68 } | 68 } |
69 | 69 |
70 String get stderr => _stderr.toString(); | 70 String get stderr => _stderr.toString(); |
71 | 71 |
72 String get stdout => _stdout.toString(); | 72 String get stdout => _stdout.toString(); |
73 | 73 |
74 Future<Null> run2(List<String> args) async { | 74 Future<Null> run2(List<String> args) async { |
75 await new Driver().start(args); | 75 await new Driver(isTesting: true).start(args); |
76 if (stderr.isNotEmpty) { | 76 if (stderr.isNotEmpty) { |
77 fail("Unexpected output to stderr:\n$stderr"); | 77 fail("Unexpected output to stderr:\n$stderr"); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 void tearDown() { | 81 void tearDown() { |
82 outSink = _savedOutSink; | 82 outSink = _savedOutSink; |
83 errorSink = _savedErrorSink; | 83 errorSink = _savedErrorSink; |
84 exitCode = _savedExitCode; | 84 exitCode = _savedExitCode; |
85 exitHandler = _savedExitHandler; | 85 exitHandler = _savedExitHandler; |
86 } | 86 } |
87 } | 87 } |
OLD | NEW |