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

Unified Diff: test/pubspec_test.dart

Issue 1417993002: Fix a bug in pubspec parsing. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 2 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 | « 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: test/pubspec_test.dart
diff --git a/test/pubspec_test.dart b/test/pubspec_test.dart
index 6a24d8ae838c787ffd93cae4aa8d437853cbbbe0..54be75b00828d696fecb537278380d6c4942f71b 100644
--- a/test/pubspec_test.dart
+++ b/test/pubspec_test.dart
@@ -229,6 +229,14 @@ dependencies:
''', (pubspec) => pubspec.dependencies);
});
+ test("throws if there's no source", () {
+ expectPubspecException('''
+dependencies:
+ foo:
+ version: 1.2.3
+''', (pubspec) => pubspec.dependencies);
+ });
+
test("throws if 'name' is not a string", () {
expectPubspecException('name: [not, a, string]',
(pubspec) => pubspec.name);
« no previous file with comments | « lib/src/pubspec.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698