| 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('checks out packages transitively from Git', () { | 9 integration('checks out packages transitively from Git', () { |
| 10 ensureGit(); | 10 ensureGit(); |
| 11 | 11 |
| 12 d.git('foo.git', [ | 12 d.git('foo.git', [ |
| 13 d.libDir('foo'), | 13 d.libDir('foo'), |
| 14 d.libPubspec('foo', '1.0.0', deps: { | 14 d.libPubspec('foo', '1.0.0', deps: { |
| 15 "bar": {"git": "../bar.git"} | 15 "bar": {"git": "../bar.git"} |
| 16 }) | 16 }) |
| 17 ]).create(); | 17 ]).create(); |
| 18 | 18 |
| 19 d.git('bar.git', [ | 19 d.git('bar.git', [ |
| 20 d.libDir('bar'), | 20 d.libDir('bar'), |
| 21 d.libPubspec('bar', '1.0.0') | 21 d.libPubspec('bar', '1.0.0') |
| 22 ]).create(); | 22 ]).create(); |
| 23 | 23 |
| 24 d.appDir({"foo": {"git": "../foo.git"}}).create(); | 24 d.appDir({"foo": {"git": "../foo.git"}}).create(); |
| 25 | 25 |
| 26 pubGet(); | 26 // TODO(rnystrom): Remove "--packages-dir" and validate using the |
| 27 // ".packages" file instead of looking in the "packages" directory. |
| 28 pubGet(args: ["--packages-dir"]); |
| 27 | 29 |
| 28 d.dir(cachePath, [ | 30 d.dir(cachePath, [ |
| 29 d.dir('git', [ | 31 d.dir('git', [ |
| 30 d.dir('cache', [ | 32 d.dir('cache', [ |
| 31 d.gitPackageRepoCacheDir('foo'), | 33 d.gitPackageRepoCacheDir('foo'), |
| 32 d.gitPackageRepoCacheDir('bar') | 34 d.gitPackageRepoCacheDir('bar') |
| 33 ]), | 35 ]), |
| 34 d.gitPackageRevisionCacheDir('foo'), | 36 d.gitPackageRevisionCacheDir('foo'), |
| 35 d.gitPackageRevisionCacheDir('bar') | 37 d.gitPackageRevisionCacheDir('bar') |
| 36 ]) | 38 ]) |
| 37 ]).validate(); | 39 ]).validate(); |
| 38 | 40 |
| 39 d.dir(packagesPath, [ | 41 d.dir(packagesPath, [ |
| 40 d.dir('foo', [ | 42 d.dir('foo', [ |
| 41 d.file('foo.dart', 'main() => "foo";') | 43 d.file('foo.dart', 'main() => "foo";') |
| 42 ]), | 44 ]), |
| 43 d.dir('bar', [ | 45 d.dir('bar', [ |
| 44 d.file('bar.dart', 'main() => "bar";') | 46 d.file('bar.dart', 'main() => "bar";') |
| 45 ]) | 47 ]) |
| 46 ]).validate(); | 48 ]).validate(); |
| 47 }); | 49 }); |
| 48 } | 50 } |
| OLD | NEW |