| 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 import 'package:scheduled_test/scheduled_test.dart'; | 5 import 'package:scheduled_test/scheduled_test.dart'; |
| 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() { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // Add "bar" to the dependencies. | 32 // Add "bar" to the dependencies. |
| 33 d.appDir({ | 33 d.appDir({ |
| 34 "foo": "any", | 34 "foo": "any", |
| 35 "bar": "any" | 35 "bar": "any" |
| 36 }).create(); | 36 }).create(); |
| 37 | 37 |
| 38 // Run the solver again. | 38 // Run the solver again. |
| 39 pubGet(); | 39 pubGet(); |
| 40 | 40 |
| 41 d.packagesDir({ | 41 d.appPackagesFile({ |
| 42 "foo": "1.2.0", | 42 "foo": "1.2.0", |
| 43 "bar": "1.2.0" | 43 "bar": "1.2.0" |
| 44 }).validate(); | 44 }).validate(); |
| 45 | 45 |
| 46 // The get should not have done any network requests since the lock file is | 46 // The get should not have done any network requests since the lock file is |
| 47 // up to date. | 47 // up to date. |
| 48 globalServer.requestedPaths.then((paths) { | 48 globalServer.requestedPaths.then((paths) { |
| 49 expect(paths, unorderedEquals([ | 49 expect(paths, unorderedEquals([ |
| 50 // Bar should be requested because it's new, but not foo. | 50 // Bar should be requested because it's new, but not foo. |
| 51 "api/packages/bar", | 51 "api/packages/bar", |
| 52 // Need to download it. | 52 // Need to download it. |
| 53 "packages/bar/versions/1.2.0.tar.gz" | 53 "packages/bar/versions/1.2.0.tar.gz" |
| 54 ])); | 54 ])); |
| 55 }); | 55 }); |
| 56 }); | 56 }); |
| 57 } | 57 } |
| OLD | NEW |