| OLD | NEW |
| (Empty) |
| 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; | |
| 6 | |
| 7 import '../../descriptor.dart' as d; | |
| 8 import '../../test_pub.dart'; | |
| 9 | |
| 10 main() { | |
| 11 initConfig(); | |
| 12 integration( | |
| 13 "unlocks dependencies if necessary to ensure that a new " | |
| 14 "dependency is satisfied", | |
| 15 () { | |
| 16 servePackages((builder) { | |
| 17 builder.serve("foo", "1.0.0", deps: { | |
| 18 "bar": "<2.0.0" | |
| 19 }); | |
| 20 builder.serve("bar", "1.0.0", deps: { | |
| 21 "baz": "<2.0.0" | |
| 22 }); | |
| 23 builder.serve("baz", "1.0.0", deps: { | |
| 24 "qux": "<2.0.0" | |
| 25 }); | |
| 26 builder.serve("qux", "1.0.0"); | |
| 27 }); | |
| 28 | |
| 29 d.appDir({ | |
| 30 "foo": "any" | |
| 31 }).create(); | |
| 32 | |
| 33 pubGet(); | |
| 34 | |
| 35 d.packagesDir({ | |
| 36 "foo": "1.0.0", | |
| 37 "bar": "1.0.0", | |
| 38 "baz": "1.0.0", | |
| 39 "qux": "1.0.0" | |
| 40 }).validate(); | |
| 41 | |
| 42 servePackages((builder) { | |
| 43 builder.serve("foo", "2.0.0", deps: { | |
| 44 "bar": "<3.0.0" | |
| 45 }); | |
| 46 builder.serve("bar", "2.0.0", deps: { | |
| 47 "baz": "<3.0.0" | |
| 48 }); | |
| 49 builder.serve("baz", "2.0.0", deps: { | |
| 50 "qux": "<3.0.0" | |
| 51 }); | |
| 52 builder.serve("qux", "2.0.0"); | |
| 53 builder.serve("newdep", "2.0.0", deps: { | |
| 54 "baz": ">=1.5.0" | |
| 55 }); | |
| 56 }); | |
| 57 | |
| 58 d.appDir({ | |
| 59 "foo": "any", | |
| 60 "newdep": "any" | |
| 61 }).create(); | |
| 62 | |
| 63 pubGet(); | |
| 64 | |
| 65 d.packagesDir({ | |
| 66 "foo": "2.0.0", | |
| 67 "bar": "2.0.0", | |
| 68 "baz": "2.0.0", | |
| 69 "qux": "1.0.0", | |
| 70 "newdep": "2.0.0" | |
| 71 }).validate(); | |
| 72 }); | |
| 73 } | |
| OLD | NEW |