Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: utils/tests/pub/install/hosted/repair_cache_test.dart

Issue 12225149: Auto-reinstall broken packages in the system cache. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove dead code. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/pub/source.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 '../../../../../pkg/path/lib/path.dart' as path;
8
9 import '../../../../pub/io.dart';
10 import '../../test_pub.dart';
11
12 main() {
13 initConfig();
14 integration('re-installs a package if it has an empty "lib" directory', () {
15
16 servePackages([package("foo", "1.2.3")]);
17
18 // Set up a cache with a broken foo package.
19 dir(cachePath, [
20 dir('hosted', [
21 async(port.then((p) => dir('localhost%58$p', [
22 dir("foo-1.2.3", [
23 libPubspec("foo", "1.2.3"),
24 // Note: empty "lib" directory.
25 dir("lib", [])
26 ])
27 ])))
28 ])
29 ]).scheduleCreate();
30
31 appDir([dependency("foo", "1.2.3")]).scheduleCreate();
32
33 schedulePub(args: ['install'],
34 output: new RegExp("Dependencies installed!\$"));
35
36 cacheDir({"foo": "1.2.3"}).scheduleValidate();
37 packagesDir({"foo": "1.2.3"}).scheduleValidate();
38 });
39
40 integration('re-installs a package if it has no pubspec', () {
41
42 servePackages([package("foo", "1.2.3")]);
43
44 // Set up a cache with a broken foo package.
45 dir(cachePath, [
46 dir('hosted', [
47 async(port.then((p) => dir('localhost%58$p', [
48 dir("foo-1.2.3", [
49 libDir("foo")
50 // Note: no pubspec.
51 ])
52 ])))
53 ])
54 ]).scheduleCreate();
55
56 appDir([dependency("foo", "1.2.3")]).scheduleCreate();
57
58 schedulePub(args: ['install'],
59 output: new RegExp("Dependencies installed!\$"));
60
61 cacheDir({"foo": "1.2.3"}).scheduleValidate();
62 packagesDir({"foo": "1.2.3"}).scheduleValidate();
63 });
64 }
OLDNEW
« no previous file with comments | « utils/pub/source.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698