Index: test/backend/invoker_test.dart |
diff --git a/test/backend/invoker_test.dart b/test/backend/invoker_test.dart |
index 6cbe20d8649f1e424e78ac13803e9ee38d5d9005..7ba7c772f9216b45d20b0df691f9325777eae320 100644 |
--- a/test/backend/invoker_test.dart |
+++ b/test/backend/invoker_test.dart |
@@ -493,6 +493,20 @@ void main() { |
async.elapse(new Duration(seconds: 30)); |
}); |
}); |
+ |
+ test("a test's prints are captured and reported", () { |
+ expect(() { |
+ var liveTest = _localTest(() { |
+ print("Hello,"); |
+ return new Future(() => print("world!")); |
+ }).load(suite); |
+ |
+ expect(liveTest.onPrint.take(2).toList(), |
+ completion(equals(["Hello,", "world!"]))); |
+ |
+ return liveTest.run(); |
+ }, prints(isEmpty)); |
+ }); |
} |
LocalTest _localTest(body(), {tearDown()}) => |