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

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

Issue 354053002: Report all transformer load errors before exiting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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 | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | 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/multiple_transformers_reject_their_config_test.dart
diff --git a/sdk/lib/_internal/pub/test/transformer/a_transformer_rejects_its_config_test.dart b/sdk/lib/_internal/pub/test/transformer/multiple_transformers_reject_their_config_test.dart
similarity index 63%
copy from sdk/lib/_internal/pub/test/transformer/a_transformer_rejects_its_config_test.dart
copy to sdk/lib/_internal/pub/test/transformer/multiple_transformers_reject_their_config_test.dart
index caa0c95be8af829030039542c4c5b043d000405a..8461b5c68f5bc1e46d77f829ea5b44afad188244 100644
--- a/sdk/lib/_internal/pub/test/transformer/a_transformer_rejects_its_config_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/multiple_transformers_reject_their_config_test.dart
@@ -4,6 +4,7 @@
library pub_tests;
+import 'package:scheduled_test/scheduled_stream.dart';
import 'package:scheduled_test/scheduled_test.dart';
import '../descriptor.dart' as d;
@@ -29,11 +30,16 @@ main() {
initConfig();
withBarbackVersions("any", () {
- integration("a transformer can reject is configuration", () {
+ integration("multiple transformers in the same phase reject their "
+ "configurations", () {
d.dir(appPath, [
d.pubspec({
"name": "myapp",
- "transformers": [{"myapp/src/transformer": {'foo': 'bar'}}]
+ "transformers": [[
+ {"myapp/src/transformer": {'foo': 'bar'}},
+ {"myapp/src/transformer": {'baz': 'bang'}},
+ {"myapp/src/transformer": {'qux': 'fblthp'}}
+ ]]
}),
d.dir("lib", [d.dir("src", [
d.file("transformer.dart", REJECT_CONFIG_TRANSFORMER)
@@ -42,9 +48,13 @@ main() {
createLockFile('myapp', pkg: ['barback']);
+ // We should see three instances of the error message, once for each
+ // use of the transformer.
var pub = startPubServe();
- pub.stderr.expect(endsWith('Error loading transformer: I hate these '
- 'settings!'));
+ for (var i = 0; i < 3; i++) {
+ pub.stderr.expect(consumeThrough(endsWith('Error loading transformer: '
+ 'I hate these settings!')));
+ }
pub.shouldExit(1);
});
});
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698