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

Unified Diff: dart/utils/tests/pub/pubspec_test.dart

Issue 10534081: pub: treat a pubspec with just comments as empty (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: with tests Created 8 years, 5 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 | « dart/utils/pub/pubspec.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/utils/tests/pub/pubspec_test.dart
diff --git a/dart/utils/tests/pub/pubspec_test.dart b/dart/utils/tests/pub/pubspec_test.dart
index ddc5d51496432d8f43f7bc4ce3d3cbd5c279437a..ca4364aff7d7707df8ca962e1708d1bbdf2a57a9 100644
--- a/dart/utils/tests/pub/pubspec_test.dart
+++ b/dart/utils/tests/pub/pubspec_test.dart
@@ -53,6 +53,20 @@ dependencies:
''', sources);
});
});
+
+ test("allows comment-only files", () {
+ var sources = new SourceRegistry();
+ sources.register(new MockSource());
+
+ var pubspec = new Pubspec.parse('''
+# No external dependencies yet
+# Including for completeness
+# ...and hoping the spec expands to include details about author, version, etc
+# See http://www.dartlang.org/docs/pub-package-manager/ for details
+''', sources);
+ expect(pubspec.version, equals(Version.none));
+ expect(pubspec.dependencies, isEmpty);
+ });
});
});
}
« no previous file with comments | « dart/utils/pub/pubspec.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698