Index: test/runner/isolate_listener_test.dart |
diff --git a/test/runner/isolate_listener_test.dart b/test/runner/isolate_listener_test.dart |
index 184c86dbcccc0dc224b0c27cf87fde8b18dbcf42..06d92443331331197edeefa2ceda5e43623a030b 100644 |
--- a/test/runner/isolate_listener_test.dart |
+++ b/test/runner/isolate_listener_test.dart |
@@ -262,6 +262,15 @@ void main() { |
}); |
}); |
}); |
+ |
+ test("forwards a test's prints", () { |
+ return _isolateTest(_printTest).then((liveTest) { |
+ expect(liveTest.onPrint.take(2).toList(), |
+ completion(equals(["Hello,", "world!"]))); |
+ |
+ return liveTest.run(); |
+ }); |
+ }); |
} |
/// Loads the first test defined in [entryPoint] in another isolate. |
@@ -380,3 +389,14 @@ void _multiErrorTest(SendPort sendPort) { |
}); |
}); |
} |
+ |
+/// An isolate entrypoint that defines a test that prints twice. |
+void _printTest(SendPort sendPort) { |
+ IsolateListener.start(sendPort, () => () { |
+ test("prints", () { |
+ print("Hello,"); |
+ return new Future(() => print("world!")); |
+ }); |
+ }); |
+} |
+ |