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 'dart:io'; |
| 8 |
| 9 import '../descriptor.dart' as d; |
| 10 import '../test_pub.dart'; |
| 11 |
| 12 main() { |
| 13 initConfig(); |
| 14 |
| 15 forBothPubInstallAndUpdate((command) { |
| 16 integration("removes a transitive dependency that's no longer depended " |
| 17 "on", () { |
| 18 servePackages([ |
| 19 packageMap("foo", "1.0.0", [dependencyMap("shared-dep")]), |
| 20 packageMap("bar", "1.0.0", [ |
| 21 dependencyMap("shared-dep"), |
| 22 dependencyMap("bar-dep") |
| 23 ]), |
| 24 packageMap("shared-dep", "1.0.0"), |
| 25 packageMap("bar-dep", "1.0.0") |
| 26 ]); |
| 27 |
| 28 d.appDir([dependencyMap("foo"), dependencyMap("bar")]).create(); |
| 29 |
| 30 pubCommand(command); |
| 31 |
| 32 d.packagesDir({ |
| 33 "foo": "1.0.0", |
| 34 "bar": "1.0.0", |
| 35 "shared-dep": "1.0.0", |
| 36 "bar-dep": "1.0.0", |
| 37 }).validate(); |
| 38 |
| 39 d.appDir([dependencyMap("foo")]).create(); |
| 40 |
| 41 pubCommand(command); |
| 42 |
| 43 d.packagesDir({ |
| 44 "foo": "1.0.0", |
| 45 "bar": null, |
| 46 "shared-dep": "1.0.0", |
| 47 "bar-dep": null, |
| 48 }).validate(); |
| 49 }); |
| 50 }); |
| 51 } |
OLD | NEW |