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

Unified Diff: sdk/lib/_internal/pub/test/pubspec_test.dart

Issue 59383009: Add a reserved namespace (himBHinitial identifiers) for transformer configuration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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/pubspec.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/pubspec_test.dart
diff --git a/sdk/lib/_internal/pub/test/pubspec_test.dart b/sdk/lib/_internal/pub/test/pubspec_test.dart
index a9d777983ca9d34df605f5c2eb2d1968b431363a..afc04684f7f6e62cad108187960e3cdfbc3930ad 100644
--- a/sdk/lib/_internal/pub/test/pubspec_test.dart
+++ b/sdk/lib/_internal/pub/test/pubspec_test.dart
@@ -195,6 +195,18 @@ dependencies:
(pubspec) => pubspec.transformers);
});
+ test("throws if a transformer's configuration contains a top-level key "
+ "beginning with a dollar sign", () {
+ expectPubspecException('transformers: {pkg: {\$key: value}}',
+ (pubspec) => pubspec.transformers);
+ });
+
+ test("doesn't throw if a transformer's configuration contains a "
+ "non-top-level key beginning with a dollar sign", () {
+ expectPubspecException('transformers: {pkg: {\$key: value}}',
+ (pubspec) => pubspec.transformers);
+ });
+
test("allows comment-only files", () {
var pubspec = new Pubspec.parse('''
# No external dependencies yet
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/pubspec.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698