Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(969)

Unified Diff: tests/standalone/io/regress_7191_test.dart

Issue 11492007: Add test case for issue 7191. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comments that went missing. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/regress_7191_script.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..81f9eda664bdfa25802219f3cb16d655ead3d295
--- /dev/null
+++ b/tests/standalone/io/regress_7191_test.dart
@@ -0,0 +1,27 @@
+// 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.
+
+// Regression test for http://dartbug.com/7191.
+
+// Starts a sub-process which in turn starts another sub-process and then closes
+// its standard output. If handles are incorrectly inherited on Windows, this
+// will lead to a situation where the stdout of the first sub-process is never
+// closed which will make this test hang.
+
+import 'dart:io';
+
+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;
+ process.stderr.onData = process.stderr.read;
+ process.stdout.onClosed = () {
+ process.stdin.write([0]);
+ };
+ });
+}
« no previous file with comments | « tests/standalone/io/regress_7191_script.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698