| 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 '../../descriptor.dart' as d; | 7 import '../../descriptor.dart' as d; |
| 8 import '../../test_pub.dart'; | 8 import '../../test_pub.dart'; |
| 9 | 9 |
| 10 main() { | 10 main() { |
| 11 initConfig(); | 11 initConfig(); |
| 12 integration("updates locked Git packages", () { | 12 integration("upgrades locked Git packages", () { |
| 13 ensureGit(); | 13 ensureGit(); |
| 14 | 14 |
| 15 d.git('foo.git', [ | 15 d.git('foo.git', [ |
| 16 d.libDir('foo'), | 16 d.libDir('foo'), |
| 17 d.libPubspec('foo', '1.0.0') | 17 d.libPubspec('foo', '1.0.0') |
| 18 ]).create(); | 18 ]).create(); |
| 19 | 19 |
| 20 d.git('bar.git', [ | 20 d.git('bar.git', [ |
| 21 d.libDir('bar'), | 21 d.libDir('bar'), |
| 22 d.libPubspec('bar', '1.0.0') | 22 d.libPubspec('bar', '1.0.0') |
| 23 ]).create(); | 23 ]).create(); |
| 24 | 24 |
| 25 d.appDir({ | 25 d.appDir({ |
| 26 "foo": {"git": "../foo.git"}, | 26 "foo": {"git": "../foo.git"}, |
| 27 "bar": {"git": "../bar.git"} | 27 "bar": {"git": "../bar.git"} |
| 28 }).create(); | 28 }).create(); |
| 29 | 29 |
| 30 pubInstall(); | 30 pubGet(); |
| 31 | 31 |
| 32 d.dir(packagesPath, [ | 32 d.dir(packagesPath, [ |
| 33 d.dir('foo', [ | 33 d.dir('foo', [ |
| 34 d.file('foo.dart', 'main() => "foo";') | 34 d.file('foo.dart', 'main() => "foo";') |
| 35 ]), | 35 ]), |
| 36 d.dir('bar', [ | 36 d.dir('bar', [ |
| 37 d.file('bar.dart', 'main() => "bar";') | 37 d.file('bar.dart', 'main() => "bar";') |
| 38 ]) | 38 ]) |
| 39 ]).validate(); | 39 ]).validate(); |
| 40 | 40 |
| 41 d.git('foo.git', [ | 41 d.git('foo.git', [ |
| 42 d.libDir('foo', 'foo 2'), | 42 d.libDir('foo', 'foo 2'), |
| 43 d.libPubspec('foo', '1.0.0') | 43 d.libPubspec('foo', '1.0.0') |
| 44 ]).commit(); | 44 ]).commit(); |
| 45 | 45 |
| 46 d.git('bar.git', [ | 46 d.git('bar.git', [ |
| 47 d.libDir('bar', 'bar 2'), | 47 d.libDir('bar', 'bar 2'), |
| 48 d.libPubspec('bar', '1.0.0') | 48 d.libPubspec('bar', '1.0.0') |
| 49 ]).commit(); | 49 ]).commit(); |
| 50 | 50 |
| 51 pubUpdate(); | 51 pubUpgrade(); |
| 52 | 52 |
| 53 d.dir(packagesPath, [ | 53 d.dir(packagesPath, [ |
| 54 d.dir('foo', [ | 54 d.dir('foo', [ |
| 55 d.file('foo.dart', 'main() => "foo 2";') | 55 d.file('foo.dart', 'main() => "foo 2";') |
| 56 ]), | 56 ]), |
| 57 d.dir('bar', [ | 57 d.dir('bar', [ |
| 58 d.file('bar.dart', 'main() => "bar 2";') | 58 d.file('bar.dart', 'main() => "bar 2";') |
| 59 ]) | 59 ]) |
| 60 ]).validate(); | 60 ]).validate(); |
| 61 }); | 61 }); |
| 62 } | 62 } |
| OLD | NEW |