Chromium Code Reviews| Index: tests/standalone/src/ProcessStderrTest.dart |
| diff --git a/tests/standalone/src/ProcessStderrTest.dart b/tests/standalone/src/ProcessStderrTest.dart |
| index 17637eb008cf0a6a343d85e0c9830bfe425c518b..e2b1d530e0a535bff88fe9e960cf39fbbd576567 100644 |
| --- a/tests/standalone/src/ProcessStderrTest.dart |
| +++ b/tests/standalone/src/ProcessStderrTest.dart |
| @@ -12,7 +12,7 @@ |
| #library("ProcessStderrTest"); |
| #source("ProcessTestUtil.dart"); |
| -void test(Process process) { |
| +void test(Process process, int expectedExitCode) { |
| // Wait for the process to start and then interact with it. |
| process.startHandler = () { |
| List<int> data = "ABCDEFGHI\n".charCodes(); |
| @@ -49,12 +49,16 @@ void test(Process process) { |
| output.close(); |
| input.dataHandler = readData; |
| }; |
| + |
| + process.exitHandler = (exitCode) { |
|
Ivan Posva
2012/01/17 07:57:41
Is this being enabled by the hash table for fds?
Søren Gjesse
2012/01/17 09:28:04
I added this while tracking down a bug caused by t
Ivan Posva
2012/01/20 21:42:57
Thanks for the explanation.
|
| + Expect.equals(expectedExitCode, exitCode); |
| + }; |
| } |
| main() { |
| // Run the test using the process_test binary. |
| test(new Process.start(getProcessTestFileName(), |
| - const ["1", "1", "99", "0"])); |
| + const ["1", "1", "99", "0"]), 99); |
| // Run the test using the dart binary with an echo script. |
| // The test runner can be run from either the root or from runtime. |
| @@ -63,5 +67,5 @@ main() { |
| scriptFile = new File("../tests/standalone/src/ProcessStdIOScript.dart"); |
| } |
| Expect.isTrue(scriptFile.existsSync()); |
| - test(new Process.start(getDartFileName(), [scriptFile.name, "1"])); |
| + test(new Process.start(getDartFileName(), [scriptFile.name, "1"]), 0); |
| } |