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

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

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

Powered by Google App Engine
This is Rietveld 408576698