Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library pub_tests; | |
| 6 | |
| 7 import 'dart:io'; | |
| 8 | |
| 9 import '../../descriptor.dart' as d; | |
| 10 import '../../test_pub.dart'; | |
| 11 | |
| 12 main() { | |
| 13 initConfig(); | |
| 14 integration('updates a package using the cache', () { | |
| 15 // Run the server so that we know what URL to use in the system cache. | |
| 16 servePackages([]); | |
| 17 | |
| 18 d.cacheDir({ | |
| 19 "foo": ["1.2.2", "1.2.3"], | |
| 20 "bar": ["1.2.3"] | |
| 21 }, includePubspecs: true).create(); | |
| 22 | |
| 23 d.appDir([ | |
| 24 dependencyMap("foo", "any"), | |
| 25 dependencyMap("bar", "any") | |
| 26 ]).create(); | |
| 27 | |
| 28 schedulePub(args: ['update', '--offline'], | |
| 29 output: new RegExp("Dependencies updated!\$"), | |
| 30 error: "Warning: Updating when offline may not update you " | |
| 31 "to the latest versions of your dependencies."); | |
| 32 | |
| 33 d.packagesDir({ | |
| 34 "foo": "1.2.3", | |
| 35 "bar": "1.2.3" | |
| 36 }).validate(); | |
| 37 }); | |
|
nweiz
2013/05/06 23:02:25
We should test failure cases here, too.
Bob Nystrom
2013/05/07 21:03:09
Done.
| |
| 38 } | |
| OLD | NEW |