| 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 4909a0ecf63b5c9d56cea71f533fc35c620ab63e..d5f6884cdad3874c3b441d0efc8daa0b4b9545f9 100644
|
| --- a/tests/standalone/io/process_start_exception_test.dart
|
| +++ b/tests/standalone/io/process_start_exception_test.dart
|
| @@ -7,19 +7,17 @@
|
| #import("dart:io");
|
|
|
| testStartError() {
|
| - Process process = Process.start("__path_to_something_that_should_not_exist__",
|
| - const []);
|
| -
|
| - process.onExit = (int exitCode) {
|
| - Expect.fail("exit handler called");
|
| - };
|
| -
|
| - process.onError = (ProcessException e) {
|
| + Future<Process> processFuture =
|
| + Process.start("__path_to_something_that_should_not_exist__",
|
| + const []);
|
| + processFuture.then((p) => Expect.fail('got process despite start error'));
|
| + processFuture.handleException((e) {
|
| + Expect.isTrue(e is ProcessException);
|
| Expect.equals(2, e.errorCode, e.toString());
|
| - };
|
| + return true;
|
| + });
|
| }
|
|
|
| -
|
| testRunError() {
|
| Future<ProcessResult> processFuture =
|
| Process.run("__path_to_something_that_should_not_exist__",
|
|
|