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 library pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
| 9 import '../../descriptor.dart' as d; |
9 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
10 | 11 |
11 main() { | 12 main() { |
12 integration("updates one locked Git package but no others", () { | 13 integration("updates one locked Git package but no others", () { |
13 ensureGit(); | 14 ensureGit(); |
14 | 15 |
15 git('foo.git', [ | 16 d.git('foo.git', [ |
16 libDir('foo'), | 17 d.libDir('foo'), |
17 libPubspec('foo', '1.0.0') | 18 d.libPubspec('foo', '1.0.0') |
18 ]).scheduleCreate(); | 19 ]).create(); |
19 | 20 |
20 git('bar.git', [ | 21 d.git('bar.git', [ |
21 libDir('bar'), | 22 d.libDir('bar'), |
22 libPubspec('bar', '1.0.0') | 23 d.libPubspec('bar', '1.0.0') |
23 ]).scheduleCreate(); | 24 ]).create(); |
24 | 25 |
25 appDir([{"git": "../foo.git"}, {"git": "../bar.git"}]).scheduleCreate(); | 26 d.appDir([{"git": "../foo.git"}, {"git": "../bar.git"}]).create(); |
26 | 27 |
27 schedulePub(args: ['install'], | 28 schedulePub(args: ['install'], |
28 output: new RegExp(r"Dependencies installed!$")); | 29 output: new RegExp(r"Dependencies installed!$")); |
29 | 30 |
30 dir(packagesPath, [ | 31 d.dir(packagesPath, [ |
31 dir('foo', [ | 32 d.dir('foo', [ |
32 file('foo.dart', 'main() => "foo";') | 33 d.file('foo.dart', 'main() => "foo";') |
33 ]), | 34 ]), |
34 dir('bar', [ | 35 d.dir('bar', [ |
35 file('bar.dart', 'main() => "bar";') | 36 d.file('bar.dart', 'main() => "bar";') |
36 ]) | 37 ]) |
37 ]).scheduleValidate(); | 38 ]).validate(); |
38 | 39 |
39 git('foo.git', [ | 40 d.git('foo.git', [ |
40 libDir('foo', 'foo 2'), | 41 d.libDir('foo', 'foo 2'), |
41 libPubspec('foo', '1.0.0') | 42 d.libPubspec('foo', '1.0.0') |
42 ]).scheduleCommit(); | 43 ]).commit(); |
43 | 44 |
44 git('bar.git', [ | 45 d.git('bar.git', [ |
45 libDir('bar', 'bar 2'), | 46 d.libDir('bar', 'bar 2'), |
46 libPubspec('bar', '1.0.0') | 47 d.libPubspec('bar', '1.0.0') |
47 ]).scheduleCommit(); | 48 ]).commit(); |
48 | 49 |
49 schedulePub(args: ['update', 'foo'], | 50 schedulePub(args: ['update', 'foo'], |
50 output: new RegExp(r"Dependencies updated!$")); | 51 output: new RegExp(r"Dependencies updated!$")); |
51 | 52 |
52 dir(packagesPath, [ | 53 d.dir(packagesPath, [ |
53 dir('foo', [ | 54 d.dir('foo', [ |
54 file('foo.dart', 'main() => "foo 2";') | 55 d.file('foo.dart', 'main() => "foo 2";') |
55 ]), | 56 ]), |
56 dir('bar', [ | 57 d.dir('bar', [ |
57 file('bar.dart', 'main() => "bar";') | 58 d.file('bar.dart', 'main() => "bar";') |
58 ]) | 59 ]) |
59 ]).scheduleValidate(); | 60 ]).validate(); |
60 }); | 61 }); |
61 } | 62 } |
OLD | NEW |