OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import '../../descriptor.dart' as d; |
| 3 import '../../test_pub.dart'; |
| 4 main() { |
| 5 initConfig(); |
| 6 integration( |
| 7 "doesn't upgrade one locked Git package's dependencies if it's " |
| 8 "not necessary", |
| 9 () { |
| 10 ensureGit(); |
| 11 d.git('foo.git', [d.libDir('foo'), d.libPubspec("foo", "1.0.0", deps: { |
| 12 "foo-dep": { |
| 13 "git": "../foo-dep.git" |
| 14 } |
| 15 })]).create(); |
| 16 d.git( |
| 17 'foo-dep.git', |
| 18 [d.libDir('foo-dep'), d.libPubspec('foo-dep', '1.0.0')]).create(); |
| 19 d.appDir({ |
| 20 "foo": { |
| 21 "git": "../foo.git" |
| 22 } |
| 23 }).create(); |
| 24 pubGet(); |
| 25 d.dir( |
| 26 packagesPath, |
| 27 [ |
| 28 d.dir('foo', [d.file('foo.dart', 'main() => "foo";')]), |
| 29 d.dir('foo-dep', [d.file('foo-dep.dart', 'main() => "foo-dep";')])])
.validate(); |
| 30 d.git( |
| 31 'foo.git', |
| 32 [d.libDir('foo', 'foo 2'), d.libPubspec("foo", "1.0.0", deps: { |
| 33 "foo-dep": { |
| 34 "git": "../foo-dep.git" |
| 35 } |
| 36 })]).create(); |
| 37 d.git( |
| 38 'foo-dep.git', |
| 39 [d.libDir('foo-dep', 'foo-dep 2'), d.libPubspec('foo-dep', '1.0.0')]).co
mmit(); |
| 40 pubUpgrade(args: ['foo']); |
| 41 d.dir( |
| 42 packagesPath, |
| 43 [ |
| 44 d.dir('foo', [d.file('foo.dart', 'main() => "foo 2";')]), |
| 45 d.dir('foo-dep', [d.file('foo-dep.dart', 'main() => "foo-dep";')])])
.validate(); |
| 46 }); |
| 47 } |
OLD | NEW |