Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: sdk/lib/_internal/pub/test/transformer/can_log_messages_test.dart

Issue 200573007: Better progress reporting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/transformer/can_log_messages_test.dart
diff --git a/sdk/lib/_internal/pub/test/transformer/can_log_messages_test.dart b/sdk/lib/_internal/pub/test/transformer/can_log_messages_test.dart
index c818a73f7f1fb168b0de439b93c04a4b73e0bc6c..d80994b2211d49aa999cb6eb3685dc741b66ae93 100644
--- a/sdk/lib/_internal/pub/test/transformer/can_log_messages_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/can_log_messages_test.dart
@@ -4,6 +4,10 @@
library pub_tests;
+import 'package:scheduled_test/scheduled_test.dart';
+import 'package:scheduled_test/scheduled_stream.dart';
+
+import '../../lib/src/exit_codes.dart' as exit_codes;
import '../descriptor.dart' as d;
import '../test_pub.dart';
@@ -52,19 +56,22 @@ main() {
createLockFile('myapp', pkg: ['barback']);
- schedulePub(args: ["build"],
- output: """
-Building myapp...
+ var pub = startPub(args: ["build"]);
+ pub.stdout.expect(startsWith("Loading source assets..."));
+ pub.stdout.expect(consumeWhile(matches("Loading .* transformers...")));
+ pub.stdout.expect(startsWith("Building myapp..."));
+
+ pub.stdout.expect(emitsLines("""
[Rewrite on myapp|web/foo.txt]:
-info!
-""",
- error: """
+info!"""));
+
+ pub.stderr.expect(emitsLines("""
[Rewrite on myapp|web/foo.txt with input myapp|web/foo.foo]:
Warning!
[Rewrite on myapp|web/foo.txt]:
http://fake.com/not_real.dart:2:1: ERROR!
-Build failed.
-""",
- exitCode: 65);
+Build failed."""));
+
+ pub.shouldExit(exit_codes.DATA);
});
}
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/utils.dart ('k') | sdk/lib/_internal/pub/test/upgrade/report/describes_change_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698