OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 library pub_tests; | |
6 | |
7 import 'dart:io'; | |
8 | |
9 import '../../descriptor.dart' as d; | |
10 import '../../test_pub.dart'; | |
11 | |
12 main() { | |
13 initConfig(); | |
14 integration("doesn't update one locked Git package's dependencies if it's " | |
15 "not necessary", () { | |
16 ensureGit(); | |
17 | |
18 d.git('foo.git', [ | |
19 d.libDir('foo'), | |
20 d.libPubspec("foo", "1.0.0", deps: [{"git": "../foo-dep.git"}]) | |
21 ]).create(); | |
22 | |
23 d.git('foo-dep.git', [ | |
24 d.libDir('foo-dep'), | |
25 d.libPubspec('foo-dep', '1.0.0') | |
26 ]).create(); | |
27 | |
28 d.appDir([{"git": "../foo.git"}]).create(); | |
29 | |
30 schedulePub(args: ['install'], | |
31 output: new RegExp(r"Dependencies installed!$")); | |
32 | |
33 d.dir(packagesPath, [ | |
34 d.dir('foo', [ | |
35 d.file('foo.dart', 'main() => "foo";') | |
36 ]), | |
37 d.dir('foo-dep', [ | |
38 d.file('foo-dep.dart', 'main() => "foo-dep";') | |
39 ]) | |
40 ]).validate(); | |
41 | |
42 d.git('foo.git', [ | |
43 d.libDir('foo', 'foo 2'), | |
44 d.libPubspec("foo", "1.0.0", deps: [{"git": "../foo-dep.git"}]) | |
45 ]).create(); | |
46 | |
47 d.git('foo-dep.git', [ | |
48 d.libDir('foo-dep', 'foo-dep 2'), | |
49 d.libPubspec('foo-dep', '1.0.0') | |
50 ]).commit(); | |
51 | |
52 schedulePub(args: ['update', 'foo'], | |
53 output: new RegExp(r"Dependencies updated!$")); | |
54 | |
55 d.dir(packagesPath, [ | |
56 d.dir('foo', [ | |
57 d.file('foo.dart', 'main() => "foo 2";') | |
58 ]), | |
59 d.dir('foo-dep', [ | |
60 d.file('foo-dep.dart', 'main() => "foo-dep";') | |
61 ]), | |
62 ]).validate(); | |
63 }); | |
64 } | |
OLD | NEW |