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 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('foo_dep', [ | 33 d.dir('foo_dep', [ |
34 d.file('foo_dep.dart', 'main() => "foo_dep";') | 34 d.file('foo_dep.dart', 'main() => "foo_dep";') |
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", deps: { | 40 d.libPubspec("foo", "1.0.0", deps: { |
41 "foo_dep": {"git": "../foo_dep.git"} | 41 "foo_dep": {"git": "../foo_dep.git"} |
42 }) | 42 }) |
43 ]).create(); | 43 ]).create(); |
44 | 44 |
45 d.git('foo_dep.git', [ | 45 d.git('foo_dep.git', [ |
46 d.libDir('foo_dep', 'foo_dep 2'), | 46 d.libDir('foo_dep', 'foo_dep 2'), |
47 d.libPubspec('foo_dep', '1.0.0') | 47 d.libPubspec('foo_dep', '1.0.0') |
48 ]).commit(); | 48 ]).commit(); |
49 | 49 |
50 pubUpgrade(args: ['foo']); | 50 pubUpgrade(args: ["--packages-dir", 'foo']); |
51 | 51 |
52 d.dir(packagesPath, [ | 52 d.dir(packagesPath, [ |
53 d.dir('foo', [ | 53 d.dir('foo', [ |
54 d.file('foo.dart', 'main() => "foo 2";') | 54 d.file('foo.dart', 'main() => "foo 2";') |
55 ]), | 55 ]), |
56 d.dir('foo_dep', [ | 56 d.dir('foo_dep', [ |
57 d.file('foo_dep.dart', 'main() => "foo_dep";') | 57 d.file('foo_dep.dart', 'main() => "foo_dep";') |
58 ]), | 58 ]), |
59 ]).validate(); | 59 ]).validate(); |
60 }); | 60 }); |
61 } | 61 } |
OLD | NEW |