Index: tests/standalone/src/io/ListOutputStreamTest.dart |
diff --git a/tests/standalone/src/io/ListOutputStreamTest.dart b/tests/standalone/src/io/ListOutputStreamTest.dart |
index cb6ceacb9ebca1a59caf83dd4ed2ae7e4b271a4b..aadf60f90b88d8d7401651a32bf7395afa708ef4 100644 |
--- a/tests/standalone/src/io/ListOutputStreamTest.dart |
+++ b/tests/standalone/src/io/ListOutputStreamTest.dart |
@@ -85,9 +85,34 @@ void testListOutputStream2() { |
donePort.receive((x,y) => donePort.close()); |
} |
+void testListOutputStream3() { |
+ OutputStream stream = new ListOutputStream(); |
+ ReceivePort donePort = new ReceivePort(); |
+ void onNoPendingWrites() { |
+ stream.writeString("abcdABCD"); |
+ stream.writeString("abcdABCD", Encoding.UTF_8); |
+ stream.writeString("abcdABCD", Encoding.ISO_8859_1); |
+ stream.writeString("abcdABCD", Encoding.ASCII); |
+ stream.writeString("æøå", Encoding.UTF_8); |
+ stream.close(); |
+ } |
+ |
+ void onClosed() { |
+ var contents = stream.contents(); |
+ Expect.equals(38, contents.length); |
+ donePort.toSendPort().send(null); |
+ } |
+ |
+ stream.onNoPendingWrites = onNoPendingWrites; |
+ stream.onClosed = onClosed; |
+ |
+ donePort.receive((x,y) => donePort.close()); |
+} |
+ |
main() { |
testEmptyListOutputStream1(); |
testEmptyListOutputStream2(); |
testListOutputStream1(); |
testListOutputStream2(); |
+ testListOutputStream3(); |
} |