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 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import '../descriptor.dart' as d; | 9 import '../descriptor.dart' as d; |
10 import '../test_pub.dart'; | 10 import '../test_pub.dart'; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 integration('fails gracefully if a dependency is not cached', () { | 44 integration('fails gracefully if a dependency is not cached', () { |
45 // Run the server so that we know what URL to use in the system cache. | 45 // Run the server so that we know what URL to use in the system cache. |
46 servePackages([]); | 46 servePackages([]); |
47 | 47 |
48 d.appDir([ | 48 d.appDir([ |
49 dependencyMap("foo", "any") | 49 dependencyMap("foo", "any") |
50 ]).create(); | 50 ]).create(); |
51 | 51 |
52 pubCommand(command, args: ['--offline'], | 52 pubCommand(command, args: ['--offline'], |
53 error: new RegExp('Could not find package "foo" in cache')); | 53 error: 'Could not find package "foo" in cache.'); |
54 }); | 54 }); |
55 | 55 |
56 integration('fails gracefully no cached versions match', () { | 56 integration('fails gracefully no cached versions match', () { |
57 // Run the server so that we know what URL to use in the system cache. | 57 // Run the server so that we know what URL to use in the system cache. |
58 servePackages([]); | 58 servePackages([]); |
59 | 59 |
60 d.cacheDir({ | 60 d.cacheDir({ |
61 "foo": ["1.2.2", "1.2.3"] | 61 "foo": ["1.2.2", "1.2.3"] |
62 }, includePubspecs: true).create(); | 62 }, includePubspecs: true).create(); |
63 | 63 |
64 d.appDir([ | 64 d.appDir([ |
65 dependencyMap("foo", ">2.0.0") | 65 dependencyMap("foo", ">2.0.0") |
66 ]).create(); | 66 ]).create(); |
67 | 67 |
68 pubCommand(command, args: ['--offline'], | 68 pubCommand(command, args: ['--offline'], error: |
69 error: new RegExp("Package 'foo' has no versions that match >2.0.0")); | 69 "Package 'foo' has no versions that match >2.0.0 derived from:\n" |
| 70 "- 'myapp' depends on version >2.0.0"); |
70 }); | 71 }); |
71 }); | 72 }); |
72 } | 73 } |
OLD | NEW |