Chromium Code Reviews| 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.
|