| Index: tests/standalone/io/regress_7191_script.dart
|
| diff --git a/tests/standalone/io/regress_7191_script.dart b/tests/standalone/io/regress_7191_script.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..47beb3049c4d82f53c767db20977a8603df2b7e1
|
| --- /dev/null
|
| +++ b/tests/standalone/io/regress_7191_script.dart
|
| @@ -0,0 +1,28 @@
|
| +// 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.
|
| +
|
| +import 'dart:io';
|
| +import 'dart:isolate';
|
| +
|
| +main() {
|
| + // Open a port to make the script hang.
|
| + var port = new ReceivePort();
|
| + // Start sub-process when receiving data.
|
| + stdin.onData = () {
|
| + var data = stdin.read();
|
| + var options = new Options();
|
| + Process.start(options.executable, [options.script]).then((p) {
|
| + p.stdout.onData = p.stdout.read;
|
| + p.stderr.onData = p.stderr.read;
|
| + stdout.close();
|
| + // When receiving data again, kill sub-process and exit.
|
| + stdin.onData = () {
|
| + var data = stdin.read();
|
| + Expect.listEquals([1], data);
|
| + p.kill();
|
| + p.onExit = port.close;
|
| + };
|
| + });
|
| + };
|
| +}
|
|
|