Index: tests/standalone/io/stdin_sync_test.dart |
diff --git a/tests/standalone/io/stdin_sync_test.dart b/tests/standalone/io/stdin_sync_test.dart |
index 2710b0a83c9a4ec0fc4343f075f395f43c21d17e..ad61a035cc1093f218e1587e6dbd34db5c7fae08 100644 |
--- a/tests/standalone/io/stdin_sync_test.dart |
+++ b/tests/standalone/io/stdin_sync_test.dart |
@@ -13,9 +13,9 @@ import "package:expect/expect.dart"; |
void testReadByte() { |
void test(String line, List<String> expected) { |
var script = Platform.script.resolve("stdin_sync_script.dart").toFilePath(); |
- Process.start(Platform.executable, |
- [script]..addAll( |
- expected.map(JSON.encode))).then((process) { |
+ Process |
+ .start(Platform.executable, [script]..addAll(expected.map(JSON.encode))) |
+ .then((process) { |
process.stdin.write(line); |
process.stdin.flush().then((_) => process.stdin.close()); |
process.stderr |
@@ -23,15 +23,15 @@ void testReadByte() { |
.transform(new LineSplitter()) |
.fold(new StringBuffer(), (b, d) => b..write(d)) |
.then((data) { |
- if (data.toString() != '') throw "Bad output: '$data'"; |
- }); |
+ if (data.toString() != '') throw "Bad output: '$data'"; |
+ }); |
process.stdout |
.transform(UTF8.decoder) |
.transform(new LineSplitter()) |
.fold(new StringBuffer(), (b, d) => b..write(d)) |
.then((data) { |
- if (data.toString() != 'true') throw "Bad output: '$data'"; |
- }); |
+ if (data.toString() != 'true') throw "Bad output: '$data'"; |
+ }); |
}); |
} |
@@ -46,7 +46,6 @@ void testReadByte() { |
test("hej", ['hej']); |
} |
- |
void testEchoMode() { |
stdin.echoMode = true; |
Expect.isTrue(stdin.echoMode); |
@@ -58,7 +57,6 @@ void testEchoMode() { |
} |
} |
- |
void testLineMode() { |
stdin.lineMode = true; |
Expect.isTrue(stdin.lineMode); |
@@ -70,7 +68,6 @@ void testLineMode() { |
} |
} |
- |
void main() { |
testReadByte(); |