OLD | NEW |
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 } |
OLD | NEW |