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: |