| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS 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 file. | |
| 4 | |
| 5 library pub_tests; | |
| 6 | |
| 7 import 'dart:io'; | |
| 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('uses a relative symlink for the self link', () { | |
| 21 d.dir(appPath, [d.appPubspec(), d.libDir('foo')]).create(); | |
| 22 | |
| 23 pubGet(); | |
| 24 | |
| 25 scheduleRename(appPath, "moved"); | |
| 26 | |
| 27 d.dir( | |
| 28 "moved", | |
| 29 [ | |
| 30 d.dir( | |
| 31 "packages", | |
| 32 [d.dir("myapp", [d.file('foo.dart', 'main() => "foo";')])])]).va
lidate(); | |
| 33 }); | |
| 34 | |
| 35 integration('uses a relative symlink for secondary packages directory', () { | |
| 36 d.dir(appPath, [d.appPubspec(), d.libDir('foo'), d.dir("bin")]).create(); | |
| 37 | |
| 38 pubGet(); | |
| 39 | |
| 40 scheduleRename(appPath, "moved"); | |
| 41 | |
| 42 d.dir( | |
| 43 "moved", | |
| 44 [ | |
| 45 d.dir( | |
| 46 "bin", | |
| 47 [ | |
| 48 d.dir( | |
| 49 "packages", | |
| 50 [d.dir("myapp", [d.file('foo.dart', 'main() => "foo";')]
)])])]).validate(); | |
| 51 }); | |
| 52 } | |
| OLD | NEW |