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 library pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import '../../descriptor.dart' as d; | 7 import '../../descriptor.dart' as d; |
8 import '../../test_pub.dart'; | 8 import '../../test_pub.dart'; |
9 | 9 |
10 main() { | 10 main() { |
11 initConfig(); | 11 initConfig(); |
12 integration("upgrades dependencies whose constraints have been removed", () { | 12 integration("upgrades dependencies whose constraints have been removed", () { |
13 servePackages((builder) { | 13 servePackages((builder) { |
14 builder.serve("foo", "1.0.0", deps: {"shared-dep": "any"}); | 14 builder.serve("foo", "1.0.0", deps: { |
15 builder.serve("bar", "1.0.0", deps: {"shared-dep": "<2.0.0"}); | 15 "shared-dep": "any" |
| 16 }); |
| 17 builder.serve("bar", "1.0.0", deps: { |
| 18 "shared-dep": "<2.0.0" |
| 19 }); |
16 builder.serve("shared-dep", "1.0.0"); | 20 builder.serve("shared-dep", "1.0.0"); |
17 builder.serve("shared-dep", "2.0.0"); | 21 builder.serve("shared-dep", "2.0.0"); |
18 }); | 22 }); |
19 | 23 |
20 d.appDir({"foo": "any", "bar": "any"}).create(); | 24 d.appDir({ |
| 25 "foo": "any", |
| 26 "bar": "any" |
| 27 }).create(); |
21 | 28 |
22 pubUpgrade(); | 29 pubUpgrade(); |
23 | 30 |
24 d.packagesDir({ | 31 d.packagesDir({ |
25 "foo": "1.0.0", | 32 "foo": "1.0.0", |
26 "bar": "1.0.0", | 33 "bar": "1.0.0", |
27 "shared-dep": "1.0.0" | 34 "shared-dep": "1.0.0" |
28 }).validate(); | 35 }).validate(); |
29 | 36 |
30 d.appDir({"foo": "any"}).create(); | 37 d.appDir({ |
| 38 "foo": "any" |
| 39 }).create(); |
31 | 40 |
32 pubUpgrade(); | 41 pubUpgrade(); |
33 | 42 |
34 d.packagesDir({ | 43 d.packagesDir({ |
35 "foo": "1.0.0", | 44 "foo": "1.0.0", |
36 "bar": null, | 45 "bar": null, |
37 "shared-dep": "2.0.0" | 46 "shared-dep": "2.0.0" |
38 }).validate(); | 47 }).validate(); |
39 }); | 48 }); |
40 } | 49 } |
OLD | NEW |