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

Side by Side Diff: sdk/lib/_internal/pub/test/install/hosted/repair_cache_test.dart

Issue 16034002: Use helper methods for running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of unnecessary RegExps in tests. Created 7 years, 7 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 'package:pathos/path.dart' as path; 7 import 'package:pathos/path.dart' as path;
8 8
9 import '../../../lib/src/io.dart'; 9 import '../../../lib/src/io.dart';
10 import '../../descriptor.dart' as d; 10 import '../../descriptor.dart' as d;
(...skipping 12 matching lines...) Expand all
23 d.libPubspec("foo", "1.2.3"), 23 d.libPubspec("foo", "1.2.3"),
24 // Note: empty "lib" directory. 24 // Note: empty "lib" directory.
25 d.dir("lib", []) 25 d.dir("lib", [])
26 ]) 26 ])
27 ]))) 27 ])))
28 ]) 28 ])
29 ]).create(); 29 ]).create();
30 30
31 d.appDir([dependencyMap("foo", "1.2.3")]).create(); 31 d.appDir([dependencyMap("foo", "1.2.3")]).create();
32 32
33 schedulePub(args: ['install'], 33 pubInstall();
34 output: new RegExp("Dependencies installed!\$"));
35 34
36 d.cacheDir({"foo": "1.2.3"}).validate(); 35 d.cacheDir({"foo": "1.2.3"}).validate();
37 d.packagesDir({"foo": "1.2.3"}).validate(); 36 d.packagesDir({"foo": "1.2.3"}).validate();
38 }); 37 });
39 38
40 integration('re-installs a package if it has no pubspec', () { 39 integration('re-installs a package if it has no pubspec', () {
41 servePackages([packageMap("foo", "1.2.3")]); 40 servePackages([packageMap("foo", "1.2.3")]);
42 41
43 // Set up a cache with a broken foo package. 42 // Set up a cache with a broken foo package.
44 d.dir(cachePath, [ 43 d.dir(cachePath, [
45 d.dir('hosted', [ 44 d.dir('hosted', [
46 d.async(port.then((p) => d.dir('localhost%58$p', [ 45 d.async(port.then((p) => d.dir('localhost%58$p', [
47 d.dir("foo-1.2.3", [ 46 d.dir("foo-1.2.3", [
48 d.libDir("foo") 47 d.libDir("foo")
49 // Note: no pubspec. 48 // Note: no pubspec.
50 ]) 49 ])
51 ]))) 50 ])))
52 ]) 51 ])
53 ]).create(); 52 ]).create();
54 53
55 d.appDir([dependencyMap("foo", "1.2.3")]).create(); 54 d.appDir([dependencyMap("foo", "1.2.3")]).create();
56 55
57 schedulePub(args: ['install'], 56 pubInstall();
58 output: new RegExp("Dependencies installed!\$"));
59 57
60 d.cacheDir({"foo": "1.2.3"}).validate(); 58 d.cacheDir({"foo": "1.2.3"}).validate();
61 d.packagesDir({"foo": "1.2.3"}).validate(); 59 d.packagesDir({"foo": "1.2.3"}).validate();
62 }); 60 });
63 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698