| 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 import 'package:pub/src/exit_codes.dart' as exit_codes; | 5 import 'package:pub/src/exit_codes.dart' as exit_codes; |
| 6 import 'package:scheduled_test/scheduled_test.dart'; | 6 import 'package:scheduled_test/scheduled_test.dart'; |
| 7 | 7 |
| 8 import '../../descriptor.dart' as d; | 8 import '../../descriptor.dart' as d; |
| 9 import '../../test_pub.dart'; | 9 import '../../test_pub.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 integration("upgrades Git packages to an incompatible pubspec", () { | 12 integration("upgrades Git packages to an incompatible pubspec", () { |
| 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.appDir({"foo": {"git": "../foo.git"}}).create(); | 20 d.appDir({"foo": {"git": "../foo.git"}}).create(); |
| 21 | 21 |
| 22 pubGet(); | 22 pubGet(args: ["--packages-dir"]); |
| 23 | 23 |
| 24 d.dir(packagesPath, [ | 24 d.dir(packagesPath, [ |
| 25 d.dir('foo', [ | 25 d.dir('foo', [ |
| 26 d.file('foo.dart', 'main() => "foo";') | 26 d.file('foo.dart', 'main() => "foo";') |
| 27 ]) | 27 ]) |
| 28 ]).validate(); | 28 ]).validate(); |
| 29 | 29 |
| 30 d.git('foo.git', [ | 30 d.git('foo.git', [ |
| 31 d.libDir('zoo'), | 31 d.libDir('zoo'), |
| 32 d.libPubspec('zoo', '1.0.0') | 32 d.libPubspec('zoo', '1.0.0') |
| 33 ]).commit(); | 33 ]).commit(); |
| 34 | 34 |
| 35 pubUpgrade(error: contains('"name" field doesn\'t match expected name ' | 35 pubUpgrade( |
| 36 '"foo".'), exitCode: exit_codes.DATA); | 36 args: ['--packages-dir'], |
| 37 error: contains('"name" field doesn\'t match expected name "foo".'), |
| 38 exitCode: exit_codes.DATA); |
| 37 | 39 |
| 38 d.dir(packagesPath, [ | 40 d.dir(packagesPath, [ |
| 39 d.dir('foo', [ | 41 d.dir('foo', [ |
| 40 d.file('foo.dart', 'main() => "foo";') | 42 d.file('foo.dart', 'main() => "foo";') |
| 41 ]) | 43 ]) |
| 42 ]).validate(); | 44 ]).validate(); |
| 43 }); | 45 }); |
| 44 } | 46 } |
| OLD | NEW |