| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import 'package:analyzer_cli/src/driver.dart'; | 7 import 'package:analyzer_cli/src/driver.dart'; |
| 8 import 'package:analyzer_cli/src/options.dart'; | 8 import 'package:analyzer_cli/src/options.dart'; |
| 9 import 'package:path/path.dart' as path; | 9 import 'package:path/path.dart' as path; |
| 10 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 void tearDown() { | 35 void tearDown() { |
| 36 outSink = savedOutSink; | 36 outSink = savedOutSink; |
| 37 errorSink = savedErrorSink; | 37 errorSink = savedErrorSink; |
| 38 exitCode = savedExitCode; | 38 exitCode = savedExitCode; |
| 39 exitHandler = savedExitHandler; | 39 exitHandler = savedExitHandler; |
| 40 } | 40 } |
| 41 | 41 |
| 42 test_once() async { | 42 test_once() async { |
| 43 String testDir = | 43 String testDir = |
| 44 path.join(testDirectory, 'data', 'error_upgrade_fails_cli'); | 44 path.join(testDirectory, 'data', 'error_upgrade_fails_cli'); |
| 45 Driver driver = new Driver(); | 45 Driver driver = new Driver(isTesting: true); |
| 46 await driver.start([path.join(testDir, 'foo.dart')]); | 46 await driver.start([path.join(testDir, 'foo.dart')]); |
| 47 | 47 |
| 48 expect(exitCode, 3); | 48 expect(exitCode, 3); |
| 49 } | 49 } |
| 50 } | 50 } |
| OLD | NEW |