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

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

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 years, 10 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
Index: tests/standalone/io/process_std_io_script.dart
diff --git a/tests/standalone/io/process_std_io_script.dart b/tests/standalone/io/process_std_io_script.dart
index bc8b240c8aaf76843aad665b2436c2024814cd84..06ee29ad103abf30aeaf46909e2ee016d24ffc39 100644
--- a/tests/standalone/io/process_std_io_script.dart
+++ b/tests/standalone/io/process_std_io_script.dart
@@ -10,15 +10,14 @@ main() {
var options = new Options();
if (options.arguments.length > 0) {
if (options.arguments[0] == "0") {
- stdin.onData = () => stdout.write(stdin.read());
+ stdin.pipe(stdout);
} else if (options.arguments[0] == "1") {
- stdin.onData = () => stderr.write(stdin.read());
+ stdin.pipe(stderr);
} else if (options.arguments[0] == "2") {
- stdin.onData = () {
- var data = stdin.read();
- stdout.write(data);
- stderr.write(data);
- };
+ stdin.listen((data) {
+ stdout.add(data);
+ stderr.add(data);
+ });
}
}
}
« no previous file with comments | « tests/standalone/io/process_set_exit_code_script.dart ('k') | tests/standalone/io/process_std_io_script2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698