| 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 '../../descriptor.dart' as d; | 5 import '../../descriptor.dart' as d; |
| 6 import '../../test_pub.dart'; | 6 import '../../test_pub.dart'; |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 integration("upgrades Git packages to a nonexistent pubspec", () { | 9 integration("upgrades Git packages to a nonexistent pubspec", () { |
| 10 ensureGit(); | 10 ensureGit(); |
| 11 | 11 |
| 12 var repo = d.git('foo.git', [ | 12 var repo = d.git('foo.git', [ |
| 13 d.libDir('foo'), | 13 d.libDir('foo'), |
| 14 d.libPubspec('foo', '1.0.0') | 14 d.libPubspec('foo', '1.0.0') |
| 15 ]); | 15 ]); |
| 16 repo.create(); | 16 repo.create(); |
| 17 | 17 |
| 18 d.appDir({"foo": {"git": "../foo.git"}}).create(); | 18 d.appDir({"foo": {"git": "../foo.git"}}).create(); |
| 19 | 19 |
| 20 pubGet(); | 20 pubGet(args: ["--packages-dir"]); |
| 21 | 21 |
| 22 d.dir(packagesPath, [ | 22 d.dir(packagesPath, [ |
| 23 d.dir('foo', [ | 23 d.dir('foo', [ |
| 24 d.file('foo.dart', 'main() => "foo";') | 24 d.file('foo.dart', 'main() => "foo";') |
| 25 ]) | 25 ]) |
| 26 ]).validate(); | 26 ]).validate(); |
| 27 | 27 |
| 28 repo.runGit(['rm', 'pubspec.yaml']); | 28 repo.runGit(['rm', 'pubspec.yaml']); |
| 29 repo.runGit(['commit', '-m', 'delete']); | 29 repo.runGit(['commit', '-m', 'delete']); |
| 30 | 30 |
| 31 pubUpgrade(error: new RegExp(r'Could not find a file named "pubspec.yaml" ' | 31 pubUpgrade( |
| 32 r'in [^\n]*\.')); | 32 args: ["--packages-dir"], |
| 33 error: new RegExp(r'Could not find a file named "pubspec.yaml" ' |
| 34 r'in [^\n]*\.')); |
| 33 | 35 |
| 34 d.dir(packagesPath, [ | 36 d.dir(packagesPath, [ |
| 35 d.dir('foo', [ | 37 d.dir('foo', [ |
| 36 d.file('foo.dart', 'main() => "foo";') | 38 d.file('foo.dart', 'main() => "foo";') |
| 37 ]) | 39 ]) |
| 38 ]).validate(); | 40 ]).validate(); |
| 39 }); | 41 }); |
| 40 } | 42 } |
| OLD | NEW |