| Index: tests/standalone/src/io/FileOutputStreamTest.dart
|
| diff --git a/tests/standalone/src/io/FileOutputStreamTest.dart b/tests/standalone/src/io/FileOutputStreamTest.dart
|
| index 89760ecde380a5b8f44cbb07154b3efd44b57a3e..1fc17af580f0656829a76251513684c61d5bc6ad 100644
|
| --- a/tests/standalone/src/io/FileOutputStreamTest.dart
|
| +++ b/tests/standalone/src/io/FileOutputStreamTest.dart
|
| @@ -71,7 +71,36 @@ void testOutputStreamNoPendingWrite() {
|
| }
|
|
|
|
|
| +void testOutputStreamFlush() {
|
| + Directory tempDirectory = new Directory('');
|
| +
|
| + // Create a port for waiting on the final result of this test.
|
| + ReceivePort done = new ReceivePort();
|
| + done.receive((message, replyTo) {
|
| + tempDirectory.deleteSync();
|
| + done.close();
|
| + });
|
| +
|
| + tempDirectory.createTempSync();
|
| + String fileName = "${tempDirectory.path}/test";
|
| + File file = new File(fileName);
|
| + file.createSync();
|
| + OutputStream x = file.openOutputStream();
|
| + x.write([65, 66, 67]);
|
| + x.flush();
|
| + x.write([68, 69, 70]);
|
| + x.flush();
|
| + x.write([71, 72, 73]);
|
| + x.close();
|
| + x.onClosed = () {
|
| + file.deleteSync();
|
| + done.toSendPort().send("done");
|
| + };
|
| +}
|
| +
|
| +
|
| main() {
|
| testOpenOutputStreamSync();
|
| testOutputStreamNoPendingWrite();
|
| + testOutputStreamFlush();
|
| }
|
|
|