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

Unified Diff: utils/tests/pub/install/path/shared_dependency_test.dart

Issue 12335076: Handle shared path dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
« utils/pub/path_source.dart ('K') | « utils/pub/path_source.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/install/path/shared_dependency_test.dart
diff --git a/utils/tests/pub/install/path/relative_path_test.dart b/utils/tests/pub/install/path/shared_dependency_test.dart
similarity index 51%
copy from utils/tests/pub/install/path/relative_path_test.dart
copy to utils/tests/pub/install/path/shared_dependency_test.dart
index 691beed156e84633798d70c2588893f547087552..c4a039949ec8221fc1b38f254d1abe3e790db582 100644
--- a/utils/tests/pub/install/path/relative_path_test.dart
+++ b/utils/tests/pub/install/path/shared_dependency_test.dart
@@ -4,22 +4,36 @@
import '../../../../../pkg/pathos/lib/path.dart' as path;
-import '../../../../pub/exit_codes.dart' as exit_codes;
import '../../test_pub.dart';
main() {
initConfig();
- integration("can use relative path", () {
+ integration("shared dependency with same path", () {
+ dir("shared", [
+ libDir("shared"),
+ libPubspec("shared", "0.0.1")
+ ]).scheduleCreate();
+
dir("foo", [
libDir("foo"),
- libPubspec("foo", "0.0.1")
+ libPubspec("foo", "0.0.1", deps: [
+ {"path": "../shared"}
+ ])
+ ]).scheduleCreate();
+
+ dir("bar", [
+ libDir("bar"),
+ libPubspec("bar", "0.0.1", deps: [
+ {"path": "../shared"}
+ ])
]).scheduleCreate();
dir(appPath, [
pubspec({
"name": "myapp",
"dependencies": {
- "foo": {"path": "../foo"}
+ "foo": {"path": "../foo"},
+ "bar": {"path": "../bar"}
}
})
]).scheduleCreate();
@@ -30,21 +44,33 @@ main() {
dir(packagesPath, [
dir("foo", [
file("foo.dart", 'main() => "foo";')
+ ]),
+ dir("bar", [
+ file("bar.dart", 'main() => "bar";')
+ ]),
+ dir("shared", [
+ file("shared.dart", 'main() => "shared";')
])
]).scheduleValidate();
});
- integration("path is relative to containing pubspec", () {
- dir("relative", [
- dir("foo", [
- libDir("foo"),
- libPubspec("foo", "0.0.1", deps: [
- {"path": "../bar"}
- ])
- ]),
- dir("bar", [
- libDir("bar"),
- libPubspec("bar", "0.0.1")
+ integration("shared dependency with paths that normalize the same", () {
+ dir("shared", [
+ libDir("shared"),
+ libPubspec("shared", "0.0.1")
+ ]).scheduleCreate();
+
+ dir("foo", [
+ libDir("foo"),
+ libPubspec("foo", "0.0.1", deps: [
+ {"path": "../shared"}
+ ])
+ ]).scheduleCreate();
+
+ dir("bar", [
+ libDir("bar"),
+ libPubspec("bar", "0.0.1", deps: [
+ {"path": "../././shared"}
])
]).scheduleCreate();
@@ -52,7 +78,8 @@ main() {
pubspec({
"name": "myapp",
"dependencies": {
- "foo": {"path": "../relative/foo"}
+ "foo": {"path": "../foo"},
+ "bar": {"path": "../bar"}
}
})
]).scheduleCreate();
@@ -66,7 +93,10 @@ main() {
]),
dir("bar", [
file("bar.dart", 'main() => "bar";')
+ ]),
+ dir("shared", [
+ file("shared.dart", 'main() => "shared";')
])
]).scheduleValidate();
});
-}
+}
nweiz 2013/02/25 22:08:46 Test that an absolute path and a relative path tha
Bob Nystrom 2013/02/25 22:50:26 Done.
« utils/pub/path_source.dart ('K') | « utils/pub/path_source.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698