| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.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 '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
| 8 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
| 9 import 'utils.dart'; | 9 import 'utils.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 initConfig(); | 12 initConfig(); |
| 13 integration("does not get if the locked version of a dependency is allowed " | 13 integration( |
| 14 "by the pubspec's constraint", () { | 14 "does not get if the locked version of a dependency is allowed " |
| 15 d.dir("foo", [ | 15 "by the pubspec's constraint", |
| 16 d.libPubspec("foo", "0.0.1"), | 16 () { |
| 17 d.libDir("foo") | 17 d.dir("foo", [d.libPubspec("foo", "0.0.1"), d.libDir("foo")]).create(); |
| 18 ]).create(); | |
| 19 | 18 |
| 20 // Get "foo" into the lock file. | 19 // Get "foo" into the lock file. |
| 21 d.dir(appPath, [ | 20 d.dir(appPath, [d.appPubspec({ |
| 22 d.appPubspec({ | |
| 23 "foo": { | 21 "foo": { |
| 24 "path": "../foo", | 22 "path": "../foo", |
| 25 "version": ">=0.0.1" | 23 "version": ">=0.0.1" |
| 26 }, | 24 }, |
| 27 }) | 25 })]).create(); |
| 28 ]).create(); | |
| 29 pubGet(); | 26 pubGet(); |
| 30 | 27 |
| 31 // Change the version. | 28 // Change the version. |
| 32 d.dir(appPath, [ | 29 d.dir(appPath, [d.appPubspec({ |
| 33 d.appPubspec({ | |
| 34 "foo": { | 30 "foo": { |
| 35 "path": "../foo", | 31 "path": "../foo", |
| 36 "version": "<2.0.0" | 32 "version": "<2.0.0" |
| 37 }, | 33 }, |
| 38 }) | 34 })]).create(); |
| 39 ]).create(); | |
| 40 | 35 |
| 41 pubServe(shouldGetFirst: false); | 36 pubServe(shouldGetFirst: false); |
| 42 requestShouldSucceed("packages/foo/foo.dart", 'main() => "foo";'); | 37 requestShouldSucceed("packages/foo/foo.dart", 'main() => "foo";'); |
| 43 endPubServe(); | 38 endPubServe(); |
| 44 }); | 39 }); |
| 45 } | 40 } |
| OLD | NEW |