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

Side by Side Diff: test/get/git/locked_revision_without_repo_test.dart

Issue 2377063002: Make "--no-packages-dir" the default. (Closed)
Patch Set: Created 4 years, 2 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
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 import 'package:path/path.dart' as path; 5 import 'package:path/path.dart' as path;
6 import 'package:pub/src/io.dart'; 6 import 'package:pub/src/io.dart';
7 import 'package:scheduled_test/scheduled_test.dart'; 7 import 'package:scheduled_test/scheduled_test.dart';
8 8
9 import '../../descriptor.dart' as d; 9 import '../../descriptor.dart' as d;
10 import '../../test_pub.dart'; 10 import '../../test_pub.dart';
11 11
12 // Regression test for issue 16470. 12 // Regression test for issue 16470.
13 13
14 main() { 14 main() {
15 integration('checks out the repository for a locked revision', () { 15 integration('checks out the repository for a locked revision', () {
16 ensureGit(); 16 ensureGit();
17 17
18 d.git('foo.git', [ 18 d.git('foo.git', [
19 d.libDir('foo'), 19 d.libDir('foo'),
20 d.libPubspec('foo', '1.0.0') 20 d.libPubspec('foo', '1.0.0')
21 ]).create(); 21 ]).create();
22 22
23 d.appDir({"foo": {"git": "../foo.git"}}).create(); 23 d.appDir({"foo": {"git": "../foo.git"}}).create();
24 24
25 // This get should lock the foo.git dependency to the current revision. 25 // This get should lock the foo.git dependency to the current revision.
26 pubGet(); 26 pubGet(args: ["--packages-dir"]);
27 27
28 d.dir(packagesPath, [ 28 d.dir(packagesPath, [
29 d.dir('foo', [ 29 d.dir('foo', [
30 d.file('foo.dart', 'main() => "foo";') 30 d.file('foo.dart', 'main() => "foo";')
31 ]) 31 ])
32 ]).validate(); 32 ]).validate();
33 33
34 // Delete the packages path and the cache to simulate a brand new checkout 34 // Delete the packages path and the cache to simulate a brand new checkout
35 // of the application. 35 // of the application.
36 schedule(() => deleteEntry(path.join(sandboxDir, packagesPath))); 36 schedule(() => deleteEntry(path.join(sandboxDir, packagesPath)));
37 schedule(() => deleteEntry(path.join(sandboxDir, cachePath))); 37 schedule(() => deleteEntry(path.join(sandboxDir, cachePath)));
38 38
39 d.git('foo.git', [ 39 d.git('foo.git', [
40 d.libDir('foo', 'foo 2'), 40 d.libDir('foo', 'foo 2'),
41 d.libPubspec('foo', '1.0.0') 41 d.libPubspec('foo', '1.0.0')
42 ]).commit(); 42 ]).commit();
43 43
44 // This get shouldn't upgrade the foo.git dependency due to the lockfile. 44 // This get shouldn't upgrade the foo.git dependency due to the lockfile.
45 pubGet(); 45 pubGet(args: ["--packages-dir"]);
46 46
47 d.dir(packagesPath, [ 47 d.dir(packagesPath, [
48 d.dir('foo', [ 48 d.dir('foo', [
49 d.file('foo.dart', 'main() => "foo";') 49 d.file('foo.dart', 'main() => "foo";')
50 ]) 50 ])
51 ]).validate(); 51 ]).validate();
52 }); 52 });
53 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698