| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE d.file. |
| 4 | 4 |
| 5 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import 'package:path/path.dart' as path; | 7 import 'package:path/path.dart' as path; |
| 8 | 8 |
| 9 import '../../descriptor.dart' as d; | 9 import '../../descriptor.dart' as d; |
| 10 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
| 11 | 11 |
| 12 main() { | 12 main() { |
| 13 // Pub uses NTFS junction points to create links in the packages directory. | 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 | 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. | 15 // support relative paths. So this test, by design, will not pass on Windows. |
| 16 // So just skip it. | 16 // So just skip it. |
| 17 if (Platform.operatingSystem == "windows") return; | 17 if (Platform.operatingSystem == "windows") return; |
| 18 | 18 |
| 19 initConfig(); | |
| 20 integration("generates a symlink with a relative path if the dependency " | 19 integration("generates a symlink with a relative path if the dependency " |
| 21 "path was relative", () { | 20 "path was relative", () { |
| 22 d.dir("foo", [ | 21 d.dir("foo", [ |
| 23 d.libDir("foo"), | 22 d.libDir("foo"), |
| 24 d.libPubspec("foo", "0.0.1") | 23 d.libPubspec("foo", "0.0.1") |
| 25 ]).create(); | 24 ]).create(); |
| 26 | 25 |
| 27 d.dir(appPath, [ | 26 d.dir(appPath, [ |
| 28 d.appPubspec({ | 27 d.appPubspec({ |
| 29 "foo": {"path": "../foo"} | 28 "foo": {"path": "../foo"} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 41 | 40 |
| 42 d.dir("moved", [ | 41 d.dir("moved", [ |
| 43 d.dir(packagesPath, [ | 42 d.dir(packagesPath, [ |
| 44 d.dir("foo", [ | 43 d.dir("foo", [ |
| 45 d.file("foo.dart", 'main() => "foo";') | 44 d.file("foo.dart", 'main() => "foo";') |
| 46 ]) | 45 ]) |
| 47 ]) | 46 ]) |
| 48 ]).validate(); | 47 ]).validate(); |
| 49 }); | 48 }); |
| 50 } | 49 } |
| OLD | NEW |