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 library pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import 'package:scheduled_test/scheduled_test.dart'; | 7 import 'package:scheduled_test/scheduled_test.dart'; |
8 | 8 |
9 import '../../descriptor.dart' as d; | 9 import '../../descriptor.dart' as d; |
10 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
11 | 11 |
12 main() { | 12 main() { |
13 initConfig(); | |
14 | |
15 integration('only requests versions that are needed during solving', () { | 13 integration('only requests versions that are needed during solving', () { |
16 servePackages((builder) { | 14 servePackages((builder) { |
17 builder.serve("foo", "1.0.0"); | 15 builder.serve("foo", "1.0.0"); |
18 builder.serve("foo", "1.1.0"); | 16 builder.serve("foo", "1.1.0"); |
19 builder.serve("foo", "1.2.0"); | 17 builder.serve("foo", "1.2.0"); |
20 builder.serve("bar", "1.0.0"); | 18 builder.serve("bar", "1.0.0"); |
21 builder.serve("bar", "1.1.0"); | 19 builder.serve("bar", "1.1.0"); |
22 builder.serve("bar", "1.2.0"); | 20 builder.serve("bar", "1.2.0"); |
23 }); | 21 }); |
24 | 22 |
(...skipping 27 matching lines...) Loading... |
52 getRequestedPaths().then((paths) { | 50 getRequestedPaths().then((paths) { |
53 expect(paths, unorderedEquals([ | 51 expect(paths, unorderedEquals([ |
54 // Bar should be requested because it's new, but not foo. | 52 // Bar should be requested because it's new, but not foo. |
55 "api/packages/bar", | 53 "api/packages/bar", |
56 // Need to download it. | 54 // Need to download it. |
57 "packages/bar/versions/1.2.0.tar.gz" | 55 "packages/bar/versions/1.2.0.tar.gz" |
58 ])); | 56 ])); |
59 }); | 57 }); |
60 }); | 58 }); |
61 } | 59 } |
OLD | NEW |