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.")); |
+ }); |
}); |
} |