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

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

Issue 346003002: Update pub test to new analyzer error format. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4b955848c812c8661c03bf168ac6c20c3a71ff6c..528b9c8a068568cdd5dba7aa43c14d3019dfee4a 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
@@ -69,9 +69,19 @@ 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."""));
+[Rewrite on myapp|web/foo.txt]:"""));
+
+ // The details of the analyzer's error message change pretty frequently,
+ // so instead of validating the entire line, just look for a couple of
+ // salient bits of information.
+ pub.stderr.expect(allOf([
+ contains("2"), // The line number.
+ contains("1"), // The column number.
+ contains("http://fake.com/not_real.dart"), // The library.
+ contains("ERROR"), // That it's an error.
+ ]));
+
+ pub.stderr.expect("Build failed.");
pub.shouldExit(exit_codes.DATA);
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698