| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 'descriptor.dart' as d; | 5 import 'descriptor.dart' as d; |
| 6 import 'test_pub.dart'; | 6 import 'test_pub.dart'; |
| 7 import '../lib/src/barback.dart' as barback; | 7 import '../lib/src/barback.dart' as barback; |
| 8 import '../lib/src/version.dart'; | 8 import '../lib/src/version.dart'; |
| 9 | 9 |
| 10 main() { | 10 main() { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 }); | 98 }); |
| 99 | 99 |
| 100 pubGet(); | 100 pubGet(); |
| 101 | 101 |
| 102 // It should be upgraded. | 102 // It should be upgraded. |
| 103 d.packagesDir({ | 103 d.packagesDir({ |
| 104 "barback": current | 104 "barback": current |
| 105 }).validate(); | 105 }).validate(); |
| 106 }); | 106 }); |
| 107 | 107 |
| 108 integration("include pub in the error if a solve failed because there " | 108 integration("includes pub in the error if a solve failed because there " |
| 109 "is no version available", () { | 109 "is no version available", () { |
| 110 servePackages([ | 110 servePackages([ |
| 111 packageMap("barback", previous) | 111 packageMap("barback", previous) |
| 112 ]); | 112 ]); |
| 113 | 113 |
| 114 d.appDir({"barback": "any"}).create(); | 114 d.appDir({"barback": "any"}).create(); |
| 115 | 115 |
| 116 pubGet(error: """ | 116 pubGet(error: """ |
| 117 Package 'barback' has no versions that match >=$current <$max derived from: | 117 Package 'barback' has no versions that match >=$current <$max derived from: |
| 118 - 'myapp' depends on version any | 118 - 'myapp' depends on version any |
| 119 - 'pub' depends on version >=$current <$max"""); | 119 - pub itself depends on version >=$current <$max"""); |
| 120 }); | 120 }); |
| 121 | 121 |
| 122 integration("include pub in the error if a solve failed because there " | 122 integration("includes pub in the error if a solve failed because there " |
| 123 "is a disjoint constraint", () { | 123 "is a disjoint constraint", () { |
| 124 servePackages([ | 124 servePackages([ |
| 125 packageMap("barback", current) | 125 packageMap("barback", current) |
| 126 ]); | 126 ]); |
| 127 | 127 |
| 128 d.appDir({"barback": previous}).create(); | 128 d.appDir({"barback": previous}).create(); |
| 129 | 129 |
| 130 pubGet(error: """ | 130 pubGet(error: """ |
| 131 Incompatible version constraints on 'myapp': | 131 Incompatible version constraints on 'barback': |
| 132 - 'myapp' depends on version $previous | 132 - 'myapp' depends on version $previous |
| 133 - 'pub' depends on version >=$current <$max"""); | 133 - pub itself depends on version >=$current <$max"""); |
| 134 }); | 134 }); |
| 135 } | 135 } |
| OLD | NEW |