Chromium Code Reviews| Index: tests/standalone/io/regress_7191_test.dart |
| diff --git a/tests/standalone/io/regress_7191_test.dart b/tests/standalone/io/regress_7191_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b445decba5c929d376954e9e512b206ca0bbe155 |
| --- /dev/null |
| +++ b/tests/standalone/io/regress_7191_test.dart |
| @@ -0,0 +1,21 @@ |
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
|
ahe
2012/12/10 13:04:10
Add a comment to explain the purpose and how this
Mads Ager (google)
2012/12/10 13:22:48
Yes, sorry, I did in patch set 2. My comments neve
|
| +import 'dart:io'; |
| +import 'dart:isolate'; |
|
ahe
2012/12/10 13:04:10
Unnecessary import?
Mads Ager (google)
2012/12/10 13:22:48
Yes. Removed in patch set 2 which I did not commit
|
| + |
| +main() { |
| + var options = new Options(); |
| + var executable = options.executable; |
| + var scriptDir = new Path.fromNative(options.script).directoryPath; |
| + var script = scriptDir.append('regress_7191_script.dart').toNativePath(); |
| + Process.start(executable, [script]).then((process) { |
| + process.stdin.write([0]); |
| + process.stdout.onData = process.stdout.read; |
|
ahe
2012/12/10 13:04:10
This is not immediately obvious to me. What does
Mads Ager (google)
2012/12/10 13:22:48
It drains stdout and stderr of the sub-process. It
|
| + process.stderr.onData = process.stderr.read; |
| + process.stdout.onClosed = () { |
| + process.stdin.write([0]); |
| + }; |
| + }); |
| +} |