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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/get/git/check_out_and_upgrade_test.dart

Issue 937243002: Revert "Revert "Use native async/await support in pub."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
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:scheduled_test/scheduled_test.dart';
8
9 import '../../descriptor.dart' as d;
10 import '../../test_pub.dart';
11
12 main() {
13 initConfig();
14 integration('checks out and upgrades a package from Git', () {
15 ensureGit();
16
17 d.git('foo.git', [d.libDir('foo'), d.libPubspec('foo', '1.0.0')]).create();
18
19 d.appDir({
20 "foo": {
21 "git": "../foo.git"
22 }
23 }).create();
24
25 pubGet();
26
27 d.dir(
28 cachePath,
29 [
30 d.dir(
31 'git',
32 [
33 d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
34 d.gitPackageRevisionCacheDir('foo')])]).validate();
35
36 d.dir(
37 packagesPath,
38 [d.dir('foo', [d.file('foo.dart', 'main() => "foo";')])]).validate();
39
40 d.git(
41 'foo.git',
42 [d.libDir('foo', 'foo 2'), d.libPubspec('foo', '1.0.0')]).commit();
43
44 pubUpgrade(output: contains("Changed 1 dependency!"));
45
46 // When we download a new version of the git package, we should re-use the
47 // git/cache directory but create a new git/ directory.
48 d.dir(
49 cachePath,
50 [
51 d.dir(
52 'git',
53 [
54 d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
55 d.gitPackageRevisionCacheDir('foo'),
56 d.gitPackageRevisionCacheDir('foo', 2)])]).validate();
57
58 d.dir(
59 packagesPath,
60 [d.dir('foo', [d.file('foo.dart', 'main() => "foo 2";')])]).validate();
61 });
62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698