| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS 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 file. | 3 // BSD-style license that can be found in the LICENSE d.file. |
| 4 | 4 |
| 5 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import '../../../../../pkg/pathos/lib/path.dart' as path; | 7 import '../../../../../pkg/pathos/lib/path.dart' as path; |
| 8 | 8 |
| 9 import '../../descriptor.dart' as d; |
| 9 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
| 10 | 11 |
| 11 main() { | 12 main() { |
| 12 // new File().fullPathSync() does not resolve through NTFS junction points, | 13 // new File().fullPathSync() does not resolve through NTFS junction points, |
| 13 // so this feature does not work on Windows. | 14 // so this feature does not work on Windows. |
| 14 if (Platform.operatingSystem == "windows") return; | 15 if (Platform.operatingSystem == "windows") return; |
| 15 | 16 |
| 16 initConfig(); | 17 initConfig(); |
| 17 integration("shared dependency with symlink", () { | 18 integration("shared dependency with symlink", () { |
| 18 dir("shared", [ | 19 d.dir("shared", [ |
| 19 libDir("shared"), | 20 d.libDir("shared"), |
| 20 libPubspec("shared", "0.0.1") | 21 d.libPubspec("shared", "0.0.1") |
| 21 ]).scheduleCreate(); | 22 ]).create(); |
| 22 | 23 |
| 23 dir("foo", [ | 24 d.dir("foo", [ |
| 24 libDir("foo"), | 25 d.libDir("foo"), |
| 25 libPubspec("foo", "0.0.1", deps: [ | 26 d.libPubspec("foo", "0.0.1", deps: [ |
| 26 {"path": "../shared"} | 27 {"path": "../shared"} |
| 27 ]) | 28 ]) |
| 28 ]).scheduleCreate(); | 29 ]).create(); |
| 29 | 30 |
| 30 dir("bar", [ | 31 d.dir("bar", [ |
| 31 libDir("bar"), | 32 d.libDir("bar"), |
| 32 libPubspec("bar", "0.0.1", deps: [ | 33 d.libPubspec("bar", "0.0.1", deps: [ |
| 33 {"path": "../link/shared"} | 34 {"path": "../link/shared"} |
| 34 ]) | 35 ]) |
| 35 ]).scheduleCreate(); | 36 ]).create(); |
| 36 | 37 |
| 37 dir(appPath, [ | 38 d.dir(appPath, [ |
| 38 pubspec({ | 39 d.pubspec({ |
| 39 "name": "myapp", | 40 "name": "myapp", |
| 40 "dependencies": { | 41 "dependencies": { |
| 41 "foo": {"path": "../foo"}, | 42 "foo": {"path": "../foo"}, |
| 42 "bar": {"path": "../bar"} | 43 "bar": {"path": "../bar"} |
| 43 } | 44 } |
| 44 }) | 45 }) |
| 45 ]).scheduleCreate(); | 46 ]).create(); |
| 46 | 47 |
| 47 dir("link").scheduleCreate(); | 48 d.dir("link").create(); |
| 48 scheduleSymlink("shared", path.join("link", "shared")); | 49 scheduleSymlink("shared", path.join("link", "shared")); |
| 49 | 50 |
| 50 schedulePub(args: ["install"], | 51 schedulePub(args: ["install"], |
| 51 output: new RegExp(r"Dependencies installed!$")); | 52 output: new RegExp(r"Dependencies installed!$")); |
| 52 | 53 |
| 53 dir(packagesPath, [ | 54 d.dir(packagesPath, [ |
| 54 dir("foo", [file("foo.dart", 'main() => "foo";')]), | 55 d.dir("foo", [d.file("foo.dart", 'main() => "foo";')]), |
| 55 dir("bar", [file("bar.dart", 'main() => "bar";')]), | 56 d.dir("bar", [d.file("bar.dart", 'main() => "bar";')]), |
| 56 dir("shared", [file("shared.dart", 'main() => "shared";')]) | 57 d.dir("shared", [d.file("shared.dart", 'main() => "shared";')]) |
| 57 ]).scheduleValidate(); | 58 ]).validate(); |
| 58 }); | 59 }); |
| 59 } | 60 } |
| OLD | NEW |