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); |
+ }); |
} |
} |
} |