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 |
1 library pub_tests; | 5 library pub_tests; |
| 6 |
2 import '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
3 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
| 9 |
4 main() { | 10 main() { |
5 initConfig(); | 11 initConfig(); |
6 integration( | 12 integration( |
7 "downgrades a locked package's dependers in order to get it to " "min vers
ion", | 13 "downgrades a locked package's dependers in order to get it to " "min vers
ion", |
8 () { | 14 () { |
9 servePackages((builder) { | 15 servePackages((builder) { |
10 builder.serve("foo", "2.0.0", deps: { | 16 builder.serve("foo", "2.0.0", deps: { |
11 "bar": ">1.0.0" | 17 "bar": ">1.0.0" |
12 }); | 18 }); |
13 builder.serve("bar", "2.0.0"); | 19 builder.serve("bar", "2.0.0"); |
14 }); | 20 }); |
| 21 |
15 d.appDir({ | 22 d.appDir({ |
16 "foo": "any", | 23 "foo": "any", |
17 "bar": "any" | 24 "bar": "any" |
18 }).create(); | 25 }).create(); |
| 26 |
19 pubGet(); | 27 pubGet(); |
| 28 |
20 d.packagesDir({ | 29 d.packagesDir({ |
21 "foo": "2.0.0", | 30 "foo": "2.0.0", |
22 "bar": "2.0.0" | 31 "bar": "2.0.0" |
23 }).validate(); | 32 }).validate(); |
| 33 |
24 servePackages((builder) { | 34 servePackages((builder) { |
25 builder.serve("foo", "1.0.0", deps: { | 35 builder.serve("foo", "1.0.0", deps: { |
26 "bar": "any" | 36 "bar": "any" |
27 }); | 37 }); |
28 builder.serve("bar", "1.0.0"); | 38 builder.serve("bar", "1.0.0"); |
29 }); | 39 }); |
| 40 |
30 pubDowngrade(args: ['bar']); | 41 pubDowngrade(args: ['bar']); |
| 42 |
31 d.packagesDir({ | 43 d.packagesDir({ |
32 "foo": "1.0.0", | 44 "foo": "1.0.0", |
33 "bar": "1.0.0" | 45 "bar": "1.0.0" |
34 }).validate(); | 46 }).validate(); |
35 }); | 47 }); |
36 } | 48 } |
OLD | NEW |