| 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( | |
| 13 "doesn't upgrade one locked Git package's dependencies if it's " | |
| 14 "not necessary", | |
| 15 () { | |
| 16 ensureGit(); | |
| 17 | |
| 18 d.git('foo.git', [d.libDir('foo'), d.libPubspec("foo", "1.0.0", deps: { | |
| 19 "foo-dep": { | |
| 20 "git": "../foo-dep.git" | |
| 21 } | |
| 22 })]).create(); | |
| 23 | |
| 24 d.git( | |
| 25 'foo-dep.git', | |
| 26 [d.libDir('foo-dep'), d.libPubspec('foo-dep', '1.0.0')]).create(); | |
| 27 | |
| 28 d.appDir({ | |
| 29 "foo": { | |
| 30 "git": "../foo.git" | |
| 31 } | |
| 32 }).create(); | |
| 33 | |
| 34 pubGet(); | |
| 35 | |
| 36 d.dir( | |
| 37 packagesPath, | |
| 38 [ | |
| 39 d.dir('foo', [d.file('foo.dart', 'main() => "foo";')]), | |
| 40 d.dir('foo-dep', [d.file('foo-dep.dart', 'main() => "foo-dep";')])])
.validate(); | |
| 41 | |
| 42 d.git( | |
| 43 'foo.git', | |
| 44 [d.libDir('foo', 'foo 2'), d.libPubspec("foo", "1.0.0", deps: { | |
| 45 "foo-dep": { | |
| 46 "git": "../foo-dep.git" | |
| 47 } | |
| 48 })]).create(); | |
| 49 | |
| 50 d.git( | |
| 51 'foo-dep.git', | |
| 52 [d.libDir('foo-dep', 'foo-dep 2'), d.libPubspec('foo-dep', '1.0.0')]).co
mmit(); | |
| 53 | |
| 54 pubUpgrade(args: ['foo']); | |
| 55 | |
| 56 d.dir( | |
| 57 packagesPath, | |
| 58 [ | |
| 59 d.dir('foo', [d.file('foo.dart', 'main() => "foo 2";')]), | |
| 60 d.dir( | |
| 61 'foo-dep', | |
| 62 [d.file('foo-dep.dart', 'main() => "foo-dep";')]),]).validate(); | |
| 63 }); | |
| 64 } | |
| OLD | NEW |