| Index: tests/standalone/io/process_start_exception_test.dart
|
| diff --git a/tests/standalone/io/process_start_exception_test.dart b/tests/standalone/io/process_start_exception_test.dart
|
| index 1843c431e6c03abaa3a8214be5bd8098768a9309..2911f2a8bc4effbd353e94798257e48d89b686cf 100644
|
| --- a/tests/standalone/io/process_start_exception_test.dart
|
| +++ b/tests/standalone/io/process_start_exception_test.dart
|
| @@ -7,9 +7,9 @@
|
| #import("dart:io");
|
|
|
| testStartError() {
|
| - Process process =
|
| - new Process.start("__path_to_something_that_should_not_exist__",
|
| - const []);
|
| + InteractiveProcess process =
|
| + Process.start("__path_to_something_that_should_not_exist__",
|
| + const []);
|
|
|
| process.onExit = (int exitCode) {
|
| Expect.fail("exit handler called");
|
| @@ -22,17 +22,17 @@ testStartError() {
|
|
|
|
|
| testRunError() {
|
| - Process process =
|
| - new Process.run("__path_to_something_that_should_not_exist__",
|
| - const [],
|
| - null,
|
| - (exit, out, err) {
|
| - Expect.fail("exit handler called");
|
| - });
|
| + Future<ProcessResult> processFuture =
|
| + Process.run("__path_to_something_that_should_not_exist__",
|
| + const []);
|
|
|
| - process.onError = (ProcessException e) {
|
| + processFuture.then((result) => Expect.fail("exit handler called"));
|
| +
|
| + processFuture.handleException((e) {
|
| + Expect.isTrue(e is ProcessException);
|
| Expect.equals(2, e.errorCode, e.toString());
|
| - };
|
| + return true;
|
| + });
|
| }
|
|
|
| main() {
|
|
|