Index: tests/standalone/io/dart_std_io_pipe_test.dart |
diff --git a/tests/standalone/io/dart_std_io_pipe_test.dart b/tests/standalone/io/dart_std_io_pipe_test.dart |
index 4a512e0151bebda204f876a14ed70cda424de888..83c0f97f02723ead42595b3bdfe49e0078587895 100644 |
--- a/tests/standalone/io/dart_std_io_pipe_test.dart |
+++ b/tests/standalone/io/dart_std_io_pipe_test.dart |
@@ -15,14 +15,13 @@ import "dart:io"; |
import "process_test_util.dart"; |
void checkFileEmpty(String fileName) { |
- RandomAccessFile pipeOut = new File(fileName).openSync(); |
+ RandomAccessFile pipeOut = new File(fileName).openSync(); |
Expect.equals(0, pipeOut.lengthSync()); |
pipeOut.closeSync(); |
} |
- |
void checkFileContent(String fileName, String content) { |
- RandomAccessFile pipeOut = new File(fileName).openSync(); |
+ RandomAccessFile pipeOut = new File(fileName).openSync(); |
int length = pipeOut.lengthSync(); |
List data = new List<int>(length); |
pipeOut.readIntoSync(data, 0, length); |
@@ -30,7 +29,6 @@ void checkFileContent(String fileName, String content) { |
pipeOut.closeSync(); |
} |
- |
void test(String shellScript, String dartScript, String type, bool devNull) { |
Directory dir = Directory.systemTemp.createTempSync('dart_dart_std_io_pipe'); |
@@ -40,13 +38,14 @@ void test(String shellScript, String dartScript, String type, bool devNull) { |
if (devNull) pipeOutFile = "/dev/null"; |
String redirectOutFile = "${dir.path}/redirect"; |
String executable = Platform.executable; |
- List args = |
- [executable, |
- dartScript, |
- type, |
- pipeOutFile, |
- redirectOutFile, |
- devNull ? "terminal" : "file"]; |
+ List args = [ |
+ executable, |
+ dartScript, |
+ type, |
+ pipeOutFile, |
+ redirectOutFile, |
+ devNull ? "terminal" : "file" |
+ ]; |
var future = Process.start(shellScript, args); |
future.then((process) { |
process.exitCode.then((exitCode) { |
@@ -77,10 +76,10 @@ void test(String shellScript, String dartScript, String type, bool devNull) { |
checkFileEmpty("${redirectOutFile}.stderr"); |
} else { |
checkFileContent("${pipeOutFile}", "Hello\nHello\n"); |
- checkFileContent("${redirectOutFile}.stdout", |
- "Hello\nHello\nHello\nHello\n"); |
- checkFileContent("${redirectOutFile}.stderr", |
- "Hello\nHello\nHello\nHello\n"); |
+ checkFileContent( |
+ "${redirectOutFile}.stdout", "Hello\nHello\nHello\nHello\n"); |
+ checkFileContent( |
+ "${redirectOutFile}.stderr", "Hello\nHello\nHello\nHello\n"); |
} |
} |