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

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

Issue 15347004: Gracefully handle pubspecs with dependencies using unknown sources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add tests for unknown sources in lockfiles. Created 7 years, 7 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/test/pub_cache_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | 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 19f62d4e1bfc4b5f69894b5494e1b7c02ac352e3..45413dbbea97303d98fa1d57a66d8df73e3abcfb 100644
--- a/sdk/lib/_internal/pub/test/pubspec_test.dart
+++ b/sdk/lib/_internal/pub/test/pubspec_test.dart
@@ -81,6 +81,18 @@ dev_dependencies:
expect(pubspec.devDependencies, isEmpty);
});
+ test("allows an unknown source", () {
+ var pubspec = new Pubspec.parse(null, '''
+dependencies:
+ foo:
+ unknown: blah
+''', sources);
+
+ var foo = pubspec.dependencies[0];
+ expect(foo.name, equals('foo'));
+ expect(foo.source, equals('unknown'));
+ });
+
test("throws if a package is in dependencies and dev_dependencies", () {
expectFormatError('''
dependencies:
« no previous file with comments | « sdk/lib/_internal/pub/test/pub_cache_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698