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 '../../descriptor.dart' as d; | |
8 import '../../test_pub.dart'; | |
9 | |
10 main() { | |
11 initConfig(); | |
12 integration('checks out a package at a specific branch from Git', () { | |
13 ensureGit(); | |
14 | |
15 var repo = | |
16 d.git('foo.git', [d.libDir('foo', 'foo 1'), d.libPubspec('foo', '1.0.0')
]); | |
17 repo.create(); | |
18 repo.runGit(["branch", "old"]); | |
19 | |
20 d.git( | |
21 'foo.git', | |
22 [d.libDir('foo', 'foo 2'), d.libPubspec('foo', '1.0.0')]).commit(); | |
23 | |
24 d.appDir({ | |
25 "foo": { | |
26 "git": { | |
27 "url": "../foo.git", | |
28 "ref": "old" | |
29 } | |
30 } | |
31 }).create(); | |
32 | |
33 pubGet(); | |
34 | |
35 d.dir( | |
36 packagesPath, | |
37 [d.dir('foo', [d.file('foo.dart', 'main() => "foo 1";')])]).validate(); | |
38 }); | |
39 } | |
OLD | NEW |