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

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

Issue 10440044: Process exit code handling reworked for Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Actually unregister wait operation Created 8 years, 7 months 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/process_many_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/process_many_test.dart
diff --git a/tests/standalone/io/process_many_test.dart b/tests/standalone/io/process_many_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ee691bffdc3c392e48c9614e2eb238b8b4119091
--- /dev/null
+++ b/tests/standalone/io/process_many_test.dart
@@ -0,0 +1,29 @@
+// 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');
+
+endProcesses(processes) {
+ processes.forEach((p) {
+ p.stdin.writeString("line\n");
+ p.onExit = (code) => Expect.equals(0, code);
+ });
+}
+
+main() {
+ var num = 75;
+ var started = 0;
+ var processes = [];
+ for (var i = 0; i < num; i++) {
+ var script = new File("tests/standalone/io/process_many_script.dart");
+ if (!script.existsSync()) {
+ script = new File("../tests/standalone/io/process_many_script.dart");
+ }
+ var p = Process.start(new Options().executable, [script.name]);
+ processes.add(p);
+ p.onStart = () {
+ if (++started == num) endProcesses(processes);
+ };
+ }
+}
« no previous file with comments | « tests/standalone/io/process_many_script.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698