OLD | NEW |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library pub_tests; | 1 library pub_tests; |
6 | |
7 import '../descriptor.dart' as d; | 2 import '../descriptor.dart' as d; |
8 import '../test_pub.dart'; | 3 import '../test_pub.dart'; |
9 | |
10 main() { | 4 main() { |
11 initConfig(); | 5 initConfig(); |
12 | |
13 forBothPubGetAndUpgrade((command) { | 6 forBothPubGetAndUpgrade((command) { |
14 integration("removes a transitive dependency that's no longer depended " | 7 integration( |
15 "on", () { | 8 "removes a transitive dependency that's no longer depended " "on", |
| 9 () { |
16 servePackages((builder) { | 10 servePackages((builder) { |
17 builder.serve("foo", "1.0.0", deps: { | 11 builder.serve("foo", "1.0.0", deps: { |
18 "shared-dep": "any" | 12 "shared-dep": "any" |
19 }); | 13 }); |
20 builder.serve("bar", "1.0.0", deps: { | 14 builder.serve("bar", "1.0.0", deps: { |
21 "shared-dep": "any", | 15 "shared-dep": "any", |
22 "bar-dep": "any" | 16 "bar-dep": "any" |
23 }); | 17 }); |
24 builder.serve("shared-dep", "1.0.0"); | 18 builder.serve("shared-dep", "1.0.0"); |
25 builder.serve("bar-dep", "1.0.0"); | 19 builder.serve("bar-dep", "1.0.0"); |
26 }); | 20 }); |
27 | |
28 d.appDir({ | 21 d.appDir({ |
29 "foo": "any", | 22 "foo": "any", |
30 "bar": "any" | 23 "bar": "any" |
31 }).create(); | 24 }).create(); |
32 | |
33 pubCommand(command); | 25 pubCommand(command); |
34 | |
35 d.packagesDir({ | 26 d.packagesDir({ |
36 "foo": "1.0.0", | 27 "foo": "1.0.0", |
37 "bar": "1.0.0", | 28 "bar": "1.0.0", |
38 "shared-dep": "1.0.0", | 29 "shared-dep": "1.0.0", |
39 "bar-dep": "1.0.0", | 30 "bar-dep": "1.0.0" |
40 }).validate(); | 31 }).validate(); |
41 | 32 d.appDir({ |
42 d.appDir({"foo": "any"}).create(); | 33 "foo": "any" |
43 | 34 }).create(); |
44 pubCommand(command); | 35 pubCommand(command); |
45 | |
46 d.packagesDir({ | 36 d.packagesDir({ |
47 "foo": "1.0.0", | 37 "foo": "1.0.0", |
48 "bar": null, | 38 "bar": null, |
49 "shared-dep": "1.0.0", | 39 "shared-dep": "1.0.0", |
50 "bar-dep": null, | 40 "bar-dep": null |
51 }).validate(); | 41 }).validate(); |
52 }); | 42 }); |
53 }); | 43 }); |
54 } | 44 } |
OLD | NEW |