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 forBothPubGetAndUpgrade((command) { | 11 forBothPubGetAndUpgrade((command) { |
12 integration("removes a transitive dependency that's no longer depended " | 12 integration("removes a transitive dependency that's no longer depended " |
13 "on", () { | 13 "on", () { |
14 servePackages((builder) { | 14 servePackages((builder) { |
15 builder.serve("foo", "1.0.0", deps: { | 15 builder.serve("foo", "1.0.0", deps: { |
16 "shared-dep": "any" | 16 "shared_dep": "any" |
17 }); | 17 }); |
18 builder.serve("bar", "1.0.0", deps: { | 18 builder.serve("bar", "1.0.0", deps: { |
19 "shared-dep": "any", | 19 "shared_dep": "any", |
20 "bar-dep": "any" | 20 "bar_dep": "any" |
21 }); | 21 }); |
22 builder.serve("shared-dep", "1.0.0"); | 22 builder.serve("shared_dep", "1.0.0"); |
23 builder.serve("bar-dep", "1.0.0"); | 23 builder.serve("bar_dep", "1.0.0"); |
24 }); | 24 }); |
25 | 25 |
26 d.appDir({ | 26 d.appDir({ |
27 "foo": "any", | 27 "foo": "any", |
28 "bar": "any" | 28 "bar": "any" |
29 }).create(); | 29 }).create(); |
30 | 30 |
31 pubCommand(command); | 31 pubCommand(command); |
32 | 32 |
33 d.packagesDir({ | 33 d.packagesDir({ |
34 "foo": "1.0.0", | 34 "foo": "1.0.0", |
35 "bar": "1.0.0", | 35 "bar": "1.0.0", |
36 "shared-dep": "1.0.0", | 36 "shared_dep": "1.0.0", |
37 "bar-dep": "1.0.0", | 37 "bar_dep": "1.0.0", |
38 }).validate(); | 38 }).validate(); |
39 | 39 |
40 d.appDir({"foo": "any"}).create(); | 40 d.appDir({"foo": "any"}).create(); |
41 | 41 |
42 pubCommand(command); | 42 pubCommand(command); |
43 | 43 |
44 d.packagesDir({ | 44 d.packagesDir({ |
45 "foo": "1.0.0", | 45 "foo": "1.0.0", |
46 "bar": null, | 46 "bar": null, |
47 "shared-dep": "1.0.0", | 47 "shared_dep": "1.0.0", |
48 "bar-dep": null, | 48 "bar_dep": null, |
49 }).validate(); | 49 }).validate(); |
50 }); | 50 }); |
51 }); | 51 }); |
52 } | 52 } |
OLD | NEW |