OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import '../descriptor.dart' as d; |
| 3 import '../test_pub.dart'; |
| 4 import 'utils.dart'; |
| 5 main() { |
| 6 initConfig(); |
| 7 integration( |
| 8 "gets first if a git dependency's ref doesn't match the one in " |
| 9 "the lock file", |
| 10 () { |
| 11 var repo = |
| 12 d.git('foo.git', [d.libDir('foo', 'before'), d.libPubspec('foo', '1.0.0'
)]); |
| 13 repo.create(); |
| 14 var commit1 = repo.revParse('HEAD'); |
| 15 d.git( |
| 16 'foo.git', |
| 17 [d.libDir('foo', 'after'), d.libPubspec('foo', '1.0.0')]).commit(); |
| 18 var commit2 = repo.revParse('HEAD'); |
| 19 d.appDir({ |
| 20 "foo": { |
| 21 "git": { |
| 22 "url": "../foo.git", |
| 23 "ref": commit1 |
| 24 } |
| 25 } |
| 26 }).create(); |
| 27 pubGet(); |
| 28 d.appDir({ |
| 29 "foo": { |
| 30 "git": { |
| 31 "url": "../foo.git", |
| 32 "ref": commit2 |
| 33 } |
| 34 } |
| 35 }).create(); |
| 36 pubServe(shouldGetFirst: true); |
| 37 requestShouldSucceed("packages/foo/foo.dart", 'main() => "after";'); |
| 38 endPubServe(); |
| 39 }); |
| 40 } |
OLD | NEW |