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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/cache/repair/reinstalls_git_packages_test.dart

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 library pub_tests;
2 import 'package:path/path.dart' as path;
3 import 'package:scheduled_test/scheduled_test.dart';
4 import '../../../lib/src/io.dart';
5 import '../../descriptor.dart' as d;
6 import '../../test_pub.dart';
7 main() {
8 initConfig();
9 integration('reinstalls previously cached git packages', () {
10 d.git('foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
11 d.appDir({
12 "foo": {
13 "git": "../foo.git"
14 }
15 }).create();
16 pubGet();
17 d.git('foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.1')]).commit();
18 pubUpgrade();
19 var fooDirs;
20 schedule(() {
21 var gitCacheDir = path.join(sandboxDir, cachePath, "git");
22 fooDirs = listDir(
23 gitCacheDir).where((dir) => path.basename(dir).startsWith("foo-")).toL ist();
24 for (var dir in fooDirs) {
25 deleteEntry(path.join(dir, "lib", "foo.dart"));
26 }
27 });
28 schedulePub(args: ["cache", "repair"], output: '''
29 Resetting Git repository for foo 1.0.0...
30 Resetting Git repository for foo 1.0.1...
31 Reinstalled 2 packages.''');
32 schedule(() {
33 var fooLibs = fooDirs.map((dir) {
34 var fooDirName = path.basename(dir);
35 return d.dir(
36 fooDirName,
37 [d.dir("lib", [d.file("foo.dart", 'main() => "foo";')])]);
38 }).toList();
39 d.dir(cachePath, [d.dir("git", fooLibs)]).validate();
40 });
41 });
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698