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:path/path.dart' as p; | 5 import 'package:path/path.dart' as p; |
6 import 'package:pub/src/io.dart'; | 6 import 'package:pub/src/io.dart'; |
7 import 'package:scheduled_test/scheduled_test.dart'; | 7 import 'package:scheduled_test/scheduled_test.dart'; |
8 | 8 |
9 import '../../descriptor.dart' as d; | 9 import '../../descriptor.dart' as d; |
10 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
(...skipping 29 matching lines...) Expand all Loading... |
40 pubUpgrade(output: contains("Changed 1 dependency!")); | 40 pubUpgrade(output: contains("Changed 1 dependency!")); |
41 | 41 |
42 // Switch back to the old cache. | 42 // Switch back to the old cache. |
43 schedule(() { | 43 schedule(() { |
44 var cacheDir = p.join(sandboxDir, cachePath); | 44 var cacheDir = p.join(sandboxDir, cachePath); |
45 deleteEntry(cacheDir); | 45 deleteEntry(cacheDir); |
46 renameDir(p.join(sandboxDir, "$cachePath.old"), cacheDir); | 46 renameDir(p.join(sandboxDir, "$cachePath.old"), cacheDir); |
47 }); | 47 }); |
48 | 48 |
49 // Get the updated version of the git dependency based on the lockfile. | 49 // Get the updated version of the git dependency based on the lockfile. |
50 pubGet(); | 50 // TODO(rnystrom): Remove "--packages-dir" and validate using the |
| 51 // ".packages" file instead of looking in the "packages" directory. |
| 52 pubGet(args: ["--packages-dir"]); |
51 | 53 |
52 d.dir(cachePath, [ | 54 d.dir(cachePath, [ |
53 d.dir('git', [ | 55 d.dir('git', [ |
54 d.dir('cache', [d.gitPackageRepoCacheDir('foo')]), | 56 d.dir('cache', [d.gitPackageRepoCacheDir('foo')]), |
55 d.gitPackageRevisionCacheDir('foo'), | 57 d.gitPackageRevisionCacheDir('foo'), |
56 d.gitPackageRevisionCacheDir('foo', 2) | 58 d.gitPackageRevisionCacheDir('foo', 2) |
57 ]) | 59 ]) |
58 ]).validate(); | 60 ]).validate(); |
59 | 61 |
60 d.dir(packagesPath, [ | 62 d.dir(packagesPath, [ |
61 d.dir('foo', [ | 63 d.dir('foo', [ |
62 d.file('foo.dart', 'main() => "foo 2";') | 64 d.file('foo.dart', 'main() => "foo 2";') |
63 ]) | 65 ]) |
64 ]).validate(); | 66 ]).validate(); |
65 }); | 67 }); |
66 } | 68 } |
OLD | NEW |