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