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