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

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

Issue 14297021: Move pub into sdk/lib/_internal. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disallow package: imports of pub. Created 7 years, 8 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
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 'package:pathos/path.dart' as path;
8
9 import '../../../../pub/io.dart';
10 import '../../descriptor.dart' as d;
11 import '../../test_pub.dart';
12
13 main() {
14 initConfig();
15 integration('re-installs a package if it has an empty "lib" directory', () {
16 servePackages([packageMap("foo", "1.2.3")]);
17
18 // Set up a cache with a broken foo package.
19 d.dir(cachePath, [
20 d.dir('hosted', [
21 d.async(port.then((p) => d.dir('localhost%58$p', [
22 d.dir("foo-1.2.3", [
23 d.libPubspec("foo", "1.2.3"),
24 // Note: empty "lib" directory.
25 d.dir("lib", [])
26 ])
27 ])))
28 ])
29 ]).create();
30
31 d.appDir([dependencyMap("foo", "1.2.3")]).create();
32
33 schedulePub(args: ['install'],
34 output: new RegExp("Dependencies installed!\$"));
35
36 d.cacheDir({"foo": "1.2.3"}).validate();
37 d.packagesDir({"foo": "1.2.3"}).validate();
38 });
39
40 integration('re-installs a package if it has no pubspec', () {
41 servePackages([packageMap("foo", "1.2.3")]);
42
43 // Set up a cache with a broken foo package.
44 d.dir(cachePath, [
45 d.dir('hosted', [
46 d.async(port.then((p) => d.dir('localhost%58$p', [
47 d.dir("foo-1.2.3", [
48 d.libDir("foo")
49 // Note: no pubspec.
50 ])
51 ])))
52 ])
53 ]).create();
54
55 d.appDir([dependencyMap("foo", "1.2.3")]).create();
56
57 schedulePub(args: ['install'],
58 output: new RegExp("Dependencies installed!\$"));
59
60 d.cacheDir({"foo": "1.2.3"}).validate();
61 d.packagesDir({"foo": "1.2.3"}).validate();
62 });
63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698