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

Unified Diff: sdk/lib/_internal/pub/test/pub_install_and_update_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/pub_install_and_update_test.dart
diff --git a/sdk/lib/_internal/pub/test/pub_install_and_update_test.dart b/sdk/lib/_internal/pub/test/pub_install_and_update_test.dart
index f269126d02ff09a90ec04bbfaaf54e2d6c326375..06da50a8d96825b25c3aaa5c8484bbe12fb000b2 100644
--- a/sdk/lib/_internal/pub/test/pub_install_and_update_test.dart
+++ b/sdk/lib/_internal/pub/test/pub_install_and_update_test.dart
@@ -113,5 +113,30 @@ main() {
pubCommand(command,
error: new RegExp("^Incompatible dependencies on 'baz':\n"));
});
+
+ integration('does not allow a dependency on itself', () {
+ d.dir(appPath, [
+ d.appPubspec({
+ "myapp": {"path": "."}
+ })
+ ]).create();
+
+ pubCommand(command,
+ error: new RegExp("Package 'myapp' cannot depend on itself."));
+ });
+
+ integration('does not allow a dev dependency on itself', () {
+ d.dir(appPath, [
+ d.pubspec({
+ "name": "myapp",
+ "dev_dependencies": {
+ "myapp": {"path": "."}
+ }
+ })
+ ]).create();
+
+ pubCommand(command,
+ error: new RegExp("Package 'myapp' cannot depend on itself."));
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698