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

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

Issue 22825024: Don't allow packages to depend on themselves. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
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 47f838a0a7f2fb895a1e9e4f8ac3ce7e6c6748bf..ddc5538e6b11553b317c922f3f1c157ce718d1eb 100644
--- a/sdk/lib/_internal/pub/test/pubspec_test.dart
+++ b/sdk/lib/_internal/pub/test/pubspec_test.dart
@@ -103,6 +103,24 @@ dev_dependencies:
''');
});
+ test("throws if it dependes on itself", () {
+ expectFormatError('''
+name: myapp
+dependencies:
+ myapp:
+ mock: ok
+''');
+ });
+
+ test("throws if it has a dev dependency on itself", () {
+ expectFormatError('''
+name: myapp
+dev_dependencies:
+ myapp:
+ mock: ok
+''');
+ });
+
test("throws if the description isn't valid", () {
expectFormatError('''
dependencies:

Powered by Google App Engine
This is Rietveld 408576698