| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import '../../descriptor.dart' as d; | 5 import '../../descriptor.dart' as d; |
| 6 import '../../test_pub.dart'; | 6 import '../../test_pub.dart'; |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 integration("doesn't unlock dependencies if a new dependency is already " | 9 integration("doesn't unlock dependencies if a new dependency is already " |
| 10 "satisfied", () { | 10 "satisfied", () { |
| 11 servePackages((builder) { | 11 servePackages((builder) { |
| 12 builder.serve("foo", "1.0.0", deps: {"bar": "<2.0.0"}); | 12 builder.serve("foo", "1.0.0", deps: {"bar": "<2.0.0"}); |
| 13 builder.serve("bar", "1.0.0", deps: {"baz": "<2.0.0"}); | 13 builder.serve("bar", "1.0.0", deps: {"baz": "<2.0.0"}); |
| 14 builder.serve("baz", "1.0.0"); | 14 builder.serve("baz", "1.0.0"); |
| 15 }); | 15 }); |
| 16 | 16 |
| 17 d.appDir({"foo": "any"}).create(); | 17 d.appDir({"foo": "any"}).create(); |
| 18 | 18 |
| 19 pubGet(); | 19 pubGet(); |
| 20 | 20 |
| 21 d.packagesDir({ | 21 d.packagesDir({ |
| 22 "foo": "1.0.0", | 22 "foo": "1.0.0", |
| 23 "bar": "1.0.0", | 23 "bar": "1.0.0", |
| 24 "baz": "1.0.0" | 24 "baz": "1.0.0" |
| 25 }).validate(); | 25 }).validate(); |
| 26 | 26 |
| 27 servePackages((builder) { | 27 globalPackageServer.add((builder) { |
| 28 builder.serve("foo", "2.0.0", deps: {"bar": "<3.0.0"}); | 28 builder.serve("foo", "2.0.0", deps: {"bar": "<3.0.0"}); |
| 29 builder.serve("bar", "2.0.0", deps: {"baz": "<3.0.0"}); | 29 builder.serve("bar", "2.0.0", deps: {"baz": "<3.0.0"}); |
| 30 builder.serve("baz", "2.0.0"); | 30 builder.serve("baz", "2.0.0"); |
| 31 builder.serve("newdep", "2.0.0", deps: {"baz": ">=1.0.0"}); | 31 builder.serve("newdep", "2.0.0", deps: {"baz": ">=1.0.0"}); |
| 32 }); | 32 }); |
| 33 | 33 |
| 34 d.appDir({"foo": "any", "newdep": "any"}).create(); | 34 d.appDir({"foo": "any", "newdep": "any"}).create(); |
| 35 | 35 |
| 36 pubGet(); | 36 pubGet(); |
| 37 | 37 |
| 38 d.packagesDir({ | 38 d.packagesDir({ |
| 39 "foo": "1.0.0", | 39 "foo": "1.0.0", |
| 40 "bar": "1.0.0", | 40 "bar": "1.0.0", |
| 41 "baz": "1.0.0", | 41 "baz": "1.0.0", |
| 42 "newdep": "2.0.0" | 42 "newdep": "2.0.0" |
| 43 }).validate(); | 43 }).validate(); |
| 44 }); | 44 }); |
| 45 } | 45 } |
| OLD | NEW |