| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.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 d.file. | 3 // BSD-style license that can be found in the LICENSE d.file. |
| 4 | 4 |
| 5 import 'package:path/path.dart' as path; | 5 import 'package:path/path.dart' as path; |
| 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 integration('path dependency with absolute path', () { | 11 integration('path dependency with absolute path', () { |
| 12 d.dir('foo', [ | 12 d.dir('foo', [ |
| 13 d.libDir('foo'), | 13 d.libDir('foo'), |
| 14 d.libPubspec('foo', '0.0.1') | 14 d.libPubspec('foo', '0.0.1') |
| 15 ]).create(); | 15 ]).create(); |
| 16 | 16 |
| 17 d.dir(appPath, [ | 17 d.dir(appPath, [ |
| 18 d.appPubspec({ | 18 d.appPubspec({ |
| 19 "foo": {"path": path.join(sandboxDir, "foo")} | 19 "foo": {"path": path.join(sandboxDir, "foo")} |
| 20 }) | 20 }) |
| 21 ]).create(); | 21 ]).create(); |
| 22 | 22 |
| 23 pubGet(); | 23 pubGet(args: ["--packages-dir"]); |
| 24 | 24 |
| 25 d.dir(packagesPath, [ | 25 d.appPackagesFile({ |
| 26 d.dir("foo", [ | 26 "foo": path.join(sandboxDir, "foo") |
| 27 d.file("foo.dart", 'main() => "foo";') | 27 }).validate(); |
| 28 ]) | |
| 29 ]).validate(); | |
| 30 | |
| 31 // Move the packages directory and ensure the symlink still works. That | |
| 32 // will validate that we actually created an absolute symlink. | |
| 33 d.dir("moved").create(); | |
| 34 scheduleRename(packagesPath, "moved/packages"); | |
| 35 | |
| 36 d.dir("moved/packages", [ | |
| 37 d.dir("foo", [ | |
| 38 d.file("foo.dart", 'main() => "foo";') | |
| 39 ]) | |
| 40 ]).validate(); | |
| 41 }); | 28 }); |
| 42 } | 29 } |
| OLD | NEW |