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 locked Git packages", () { | 9 integration("upgrades locked Git packages", () { |
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 pubGet(args: ["--packages-dir"]); |
28 | 28 |
29 d.dir(packagesPath, [ | 29 d.dir(packagesPath, [ |
30 d.dir('foo', [ | 30 d.dir('foo', [ |
31 d.file('foo.dart', 'main() => "foo";') | 31 d.file('foo.dart', 'main() => "foo";') |
32 ]), | 32 ]), |
33 d.dir('bar', [ | 33 d.dir('bar', [ |
34 d.file('bar.dart', 'main() => "bar";') | 34 d.file('bar.dart', 'main() => "bar";') |
35 ]) | 35 ]) |
36 ]).validate(); | 36 ]).validate(); |
37 | 37 |
38 d.git('foo.git', [ | 38 d.git('foo.git', [ |
39 d.libDir('foo', 'foo 2'), | 39 d.libDir('foo', 'foo 2'), |
40 d.libPubspec('foo', '1.0.0') | 40 d.libPubspec('foo', '1.0.0') |
41 ]).commit(); | 41 ]).commit(); |
42 | 42 |
43 d.git('bar.git', [ | 43 d.git('bar.git', [ |
44 d.libDir('bar', 'bar 2'), | 44 d.libDir('bar', 'bar 2'), |
45 d.libPubspec('bar', '1.0.0') | 45 d.libPubspec('bar', '1.0.0') |
46 ]).commit(); | 46 ]).commit(); |
47 | 47 |
48 pubUpgrade(); | 48 pubUpgrade(args: ["--packages-dir"]); |
49 | 49 |
50 d.dir(packagesPath, [ | 50 d.dir(packagesPath, [ |
51 d.dir('foo', [ | 51 d.dir('foo', [ |
52 d.file('foo.dart', 'main() => "foo 2";') | 52 d.file('foo.dart', 'main() => "foo 2";') |
53 ]), | 53 ]), |
54 d.dir('bar', [ | 54 d.dir('bar', [ |
55 d.file('bar.dart', 'main() => "bar 2";') | 55 d.file('bar.dart', 'main() => "bar 2";') |
56 ]) | 56 ]) |
57 ]).validate(); | 57 ]).validate(); |
58 }); | 58 }); |
59 } | 59 } |
OLD | NEW |