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

Side by Side Diff: test/upgrade/git/do_not_upgrade_if_unneeded_test.dart

Issue 2377063002: Make "--no-packages-dir" the default. (Closed)
Patch Set: Revise again. 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
« no previous file with comments | « test/unknown_source_test.dart ('k') | test/upgrade/git/upgrade_locked_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 '../../descriptor.dart' as d; 5 import '../../descriptor.dart' as d;
6 import '../../test_pub.dart'; 6 import '../../test_pub.dart';
7 7
8 main() { 8 main() {
9 integration("doesn't upgrade one locked Git package's dependencies if it's " 9 integration("doesn't upgrade one locked Git package's dependencies if it's "
10 "not necessary", () { 10 "not necessary", () {
11 ensureGit(); 11 ensureGit();
12 12
13 d.git('foo.git', [ 13 d.git('foo.git', [
14 d.libDir('foo'), 14 d.libDir('foo'),
15 d.libPubspec("foo", "1.0.0", deps: { 15 d.libPubspec("foo", "1.0.0", deps: {
16 "foo_dep": {"git": "../foo_dep.git" 16 "foo_dep": {"git": "../foo_dep.git"
17 }}) 17 }})
18 ]).create(); 18 ]).create();
19 19
20 d.git('foo_dep.git', [ 20 d.git('foo_dep.git', [
21 d.libDir('foo_dep'), 21 d.libDir('foo_dep'),
22 d.libPubspec('foo_dep', '1.0.0') 22 d.libPubspec('foo_dep', '1.0.0')
23 ]).create(); 23 ]).create();
24 24
25 d.appDir({"foo": {"git": "../foo.git"}}).create(); 25 d.appDir({"foo": {"git": "../foo.git"}}).create();
26 26
27 pubGet(); 27 // TODO(rnystrom): Remove "--packages-dir" and validate using the
28 // ".packages" file instead of looking in the "packages" directory.
29 pubGet(args: ["--packages-dir"]);
28 30
29 d.dir(packagesPath, [ 31 d.dir(packagesPath, [
30 d.dir('foo', [ 32 d.dir('foo', [
31 d.file('foo.dart', 'main() => "foo";') 33 d.file('foo.dart', 'main() => "foo";')
32 ]), 34 ]),
33 d.dir('foo_dep', [ 35 d.dir('foo_dep', [
34 d.file('foo_dep.dart', 'main() => "foo_dep";') 36 d.file('foo_dep.dart', 'main() => "foo_dep";')
35 ]) 37 ])
36 ]).validate(); 38 ]).validate();
37 39
38 d.git('foo.git', [ 40 d.git('foo.git', [
39 d.libDir('foo', 'foo 2'), 41 d.libDir('foo', 'foo 2'),
40 d.libPubspec("foo", "1.0.0", deps: { 42 d.libPubspec("foo", "1.0.0", deps: {
41 "foo_dep": {"git": "../foo_dep.git"} 43 "foo_dep": {"git": "../foo_dep.git"}
42 }) 44 })
43 ]).create(); 45 ]).create();
44 46
45 d.git('foo_dep.git', [ 47 d.git('foo_dep.git', [
46 d.libDir('foo_dep', 'foo_dep 2'), 48 d.libDir('foo_dep', 'foo_dep 2'),
47 d.libPubspec('foo_dep', '1.0.0') 49 d.libPubspec('foo_dep', '1.0.0')
48 ]).commit(); 50 ]).commit();
49 51
50 pubUpgrade(args: ['foo']); 52 // TODO(rnystrom): Remove "--packages-dir" and validate using the
53 // ".packages" file instead of looking in the "packages" directory.
54 pubUpgrade(args: ["--packages-dir", 'foo']);
51 55
52 d.dir(packagesPath, [ 56 d.dir(packagesPath, [
53 d.dir('foo', [ 57 d.dir('foo', [
54 d.file('foo.dart', 'main() => "foo 2";') 58 d.file('foo.dart', 'main() => "foo 2";')
55 ]), 59 ]),
56 d.dir('foo_dep', [ 60 d.dir('foo_dep', [
57 d.file('foo_dep.dart', 'main() => "foo_dep";') 61 d.file('foo_dep.dart', 'main() => "foo_dep";')
58 ]), 62 ]),
59 ]).validate(); 63 ]).validate();
60 }); 64 });
61 } 65 }
OLDNEW
« no previous file with comments | « test/unknown_source_test.dart ('k') | test/upgrade/git/upgrade_locked_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698