| 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( | |
| 21 "generates a symlink with a relative path if the dependency " | |
| 22 "path was relative", | |
| 23 () { | |
| 24 d.dir("foo", [d.libDir("foo"), d.libPubspec("foo", "0.0.1")]).create(); | |
| 25 | |
| 26 d.dir(appPath, [d.appPubspec({ | |
| 27 "foo": { | |
| 28 "path": "../foo" | |
| 29 } | |
| 30 })]).create(); | |
| 31 | |
| 32 pubGet(); | |
| 33 | |
| 34 d.dir("moved").create(); | |
| 35 | |
| 36 // Move the app and package. Since they are still next to each other, it | |
| 37 // should still be found. | |
| 38 scheduleRename("foo", path.join("moved", "foo")); | |
| 39 scheduleRename(appPath, path.join("moved", appPath)); | |
| 40 | |
| 41 d.dir( | |
| 42 "moved", | |
| 43 [ | |
| 44 d.dir( | |
| 45 packagesPath, | |
| 46 [d.dir("foo", [d.file("foo.dart", 'main() => "foo";')])])]).vali
date(); | |
| 47 }); | |
| 48 } | |
| OLD | NEW |