| 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 '../../../../pub/exit_codes.dart' as exit_codes; | |
| 10 import '../../descriptor.dart' as d; | |
| 11 import '../../test_pub.dart'; | |
| 12 | |
| 13 main() { | |
| 14 // Pub uses NTFS junction points to create links in the packages directory. | |
| 15 // These (unlike the symlinks that are supported in Vista and later) do not | |
| 16 // support relative paths. So this test, by design, will not pass on Windows. | |
| 17 // So just skip it. | |
| 18 if (Platform.operatingSystem == "windows") return; | |
| 19 | |
| 20 initConfig(); | |
| 21 integration("generates a symlink with a relative path if the dependency " | |
| 22 "path was relative", () { | |
| 23 d.dir("foo", [ | |
| 24 d.libDir("foo"), | |
| 25 d.libPubspec("foo", "0.0.1") | |
| 26 ]).create(); | |
| 27 | |
| 28 d.dir(appPath, [ | |
| 29 d.pubspec({ | |
| 30 "name": "myapp", | |
| 31 "dependencies": { | |
| 32 "foo": {"path": "../foo"} | |
| 33 } | |
| 34 }) | |
| 35 ]).create(); | |
| 36 | |
| 37 schedulePub(args: ["install"], | |
| 38 output: new RegExp(r"Dependencies installed!$")); | |
| 39 | |
| 40 d.dir("moved").create(); | |
| 41 | |
| 42 // Move the app and package. Since they are still next to each other, it | |
| 43 // should still be found. | |
| 44 scheduleRename("foo", path.join("moved", "foo")); | |
| 45 scheduleRename(appPath, path.join("moved", appPath)); | |
| 46 | |
| 47 d.dir("moved", [ | |
| 48 d.dir(packagesPath, [ | |
| 49 d.dir("foo", [ | |
| 50 d.file("foo.dart", 'main() => "foo";') | |
| 51 ]) | |
| 52 ]) | |
| 53 ]).validate(); | |
| 54 }); | |
| 55 } | |
| OLD | NEW |