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 import 'package:scheduled_test/scheduled_test.dart'; | 6 import 'package:scheduled_test/scheduled_test.dart'; |
7 | 7 |
8 import '../../../lib/src/io.dart'; | 8 import '../../../lib/src/io.dart'; |
9 import '../../descriptor.dart' as d; | 9 import '../../descriptor.dart' as d; |
10 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
11 | 11 |
12 main() { | 12 main() { |
13 initConfig(); | 13 initConfig(); |
14 integration('path dependency with absolute path', () { | 14 integration('path dependency with absolute path', () { |
15 d.dir('foo', [ | 15 d.dir('foo', [ |
16 d.libDir('foo'), | 16 d.libDir('foo'), |
17 d.libPubspec('foo', '0.0.1') | 17 d.libPubspec('foo', '0.0.1') |
18 ]).create(); | 18 ]).create(); |
19 | 19 |
20 d.dir(appPath, [ | 20 d.dir(appPath, [ |
21 d.pubspec({ | 21 d.appPubspec({ |
22 "name": "myapp", | 22 "foo": {"path": path.join(sandboxDir, "foo")} |
23 "dependencies": { | |
24 "foo": {"path": path.join(sandboxDir, "foo")} | |
25 } | |
26 }) | 23 }) |
27 ]).create(); | 24 ]).create(); |
28 | 25 |
29 pubInstall(); | 26 pubInstall(); |
30 | 27 |
31 d.dir(packagesPath, [ | 28 d.dir(packagesPath, [ |
32 d.dir("foo", [ | 29 d.dir("foo", [ |
33 d.file("foo.dart", 'main() => "foo";') | 30 d.file("foo.dart", 'main() => "foo";') |
34 ]) | 31 ]) |
35 ]).validate(); | 32 ]).validate(); |
36 | 33 |
37 // Move the packages directory and ensure the symlink still works. That | 34 // Move the packages directory and ensure the symlink still works. That |
38 // will validate that we actually created an absolute symlink. | 35 // will validate that we actually created an absolute symlink. |
39 d.dir("moved").create(); | 36 d.dir("moved").create(); |
40 scheduleRename(packagesPath, "moved/packages"); | 37 scheduleRename(packagesPath, "moved/packages"); |
41 | 38 |
42 d.dir("moved/packages", [ | 39 d.dir("moved/packages", [ |
43 d.dir("foo", [ | 40 d.dir("foo", [ |
44 d.file("foo.dart", 'main() => "foo";') | 41 d.file("foo.dart", 'main() => "foo";') |
45 ]) | 42 ]) |
46 ]).validate(); | 43 ]).validate(); |
47 }); | 44 }); |
48 } | 45 } |
OLD | NEW |