| Index: tests/standalone/io/process_stdout_test.dart
|
| diff --git a/tests/standalone/io/process_stdout_test.dart b/tests/standalone/io/process_stdout_test.dart
|
| index 3ade8fe1816566ef117756655843417b688e1843..614d16161c49b2147f446eda861048827e489266 100644
|
| --- a/tests/standalone/io/process_stdout_test.dart
|
| +++ b/tests/standalone/io/process_stdout_test.dart
|
| @@ -14,9 +14,12 @@
|
|
|
| #source("process_test_util.dart");
|
|
|
| -void test(Process process, int expectedExitCode) {
|
| - // Wait for the process to start and then interact with it.
|
| - process.onStart = () {
|
| +void test(Future<Process> future, int expectedExitCode) {
|
| + future.then((process) {
|
| + process.onExit = (exitCode) {
|
| + Expect.equals(expectedExitCode, exitCode);
|
| + };
|
| +
|
| List<int> data = "ABCDEFGHI\n".charCodes();
|
| final int dataSize = data.length;
|
|
|
| @@ -50,11 +53,7 @@ void test(Process process, int expectedExitCode) {
|
| output.write(data);
|
| output.close();
|
| input.onData = readData;
|
| - };
|
| -
|
| - process.onExit = (exitCode) {
|
| - Expect.equals(expectedExitCode, exitCode);
|
| - };
|
| + });
|
| }
|
|
|
| main() {
|
|
|