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("upgrades one locked Git package but no others", () { | 9 integration("upgrades one locked Git package but no others", () { |
10 ensureGit(); | 10 ensureGit(); |
11 | 11 |
12 d.git('foo.git', [ | 12 d.git('foo.git', [ |
13 d.libDir('foo'), | 13 d.libDir('foo'), |
14 d.libPubspec('foo', '1.0.0') | 14 d.libPubspec('foo', '1.0.0') |
15 ]).create(); | 15 ]).create(); |
16 | 16 |
17 d.git('bar.git', [ | 17 d.git('bar.git', [ |
18 d.libDir('bar'), | 18 d.libDir('bar'), |
19 d.libPubspec('bar', '1.0.0') | 19 d.libPubspec('bar', '1.0.0') |
20 ]).create(); | 20 ]).create(); |
21 | 21 |
22 d.appDir({ | 22 d.appDir({ |
23 "foo": {"git": "../foo.git"}, | 23 "foo": {"git": "../foo.git"}, |
24 "bar": {"git": "../bar.git"} | 24 "bar": {"git": "../bar.git"} |
25 }).create(); | 25 }).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('bar', [ | 35 d.dir('bar', [ |
34 d.file('bar.dart', 'main() => "bar";') | 36 d.file('bar.dart', 'main() => "bar";') |
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') | 42 d.libPubspec('foo', '1.0.0') |
41 ]).commit(); | 43 ]).commit(); |
42 | 44 |
43 d.git('bar.git', [ | 45 d.git('bar.git', [ |
44 d.libDir('bar', 'bar 2'), | 46 d.libDir('bar', 'bar 2'), |
45 d.libPubspec('bar', '1.0.0') | 47 d.libPubspec('bar', '1.0.0') |
46 ]).commit(); | 48 ]).commit(); |
47 | 49 |
48 pubUpgrade(args: ['foo']); | 50 // TODO(rnystrom): Remove "--packages-dir" and validate using the |
| 51 // ".packages" file instead of looking in the "packages" directory. |
| 52 pubUpgrade(args: ['--packages-dir', 'foo']); |
49 | 53 |
50 d.dir(packagesPath, [ | 54 d.dir(packagesPath, [ |
51 d.dir('foo', [ | 55 d.dir('foo', [ |
52 d.file('foo.dart', 'main() => "foo 2";') | 56 d.file('foo.dart', 'main() => "foo 2";') |
53 ]), | 57 ]), |
54 d.dir('bar', [ | 58 d.dir('bar', [ |
55 d.file('bar.dart', 'main() => "bar";') | 59 d.file('bar.dart', 'main() => "bar";') |
56 ]) | 60 ]) |
57 ]).validate(); | 61 ]).validate(); |
58 }); | 62 }); |
59 } | 63 } |
OLD | NEW |