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 '../../../../pkg/unittest/lib/unittest.dart'; |
| 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 dir(appPath, [ |
| 22 appPubspec([]), |
| 23 libDir('foo') |
| 24 ]).scheduleCreate(); |
| 25 |
| 26 schedulePub(args: ['install'], |
| 27 output: new RegExp(r"Dependencies installed!$")); |
| 28 |
| 29 scheduleRename(appPath, "moved"); |
| 30 |
| 31 dir("moved", [ |
| 32 dir("packages", [ |
| 33 dir("myapp", [ |
| 34 file('foo.dart', 'main() => "foo";') |
| 35 ]) |
| 36 ]) |
| 37 ]).scheduleValidate(); |
| 38 }); |
| 39 |
| 40 integration('uses a relative symlink for secondary packages directory', () { |
| 41 dir(appPath, [ |
| 42 appPubspec([]), |
| 43 libDir('foo'), |
| 44 dir("bin") |
| 45 ]).scheduleCreate(); |
| 46 |
| 47 schedulePub(args: ['install'], |
| 48 output: new RegExp(r"Dependencies installed!$")); |
| 49 |
| 50 scheduleRename(appPath, "moved"); |
| 51 |
| 52 dir("moved", [ |
| 53 dir("bin", [ |
| 54 dir("packages", [ |
| 55 dir("myapp", [ |
| 56 file('foo.dart', 'main() => "foo";') |
| 57 ]) |
| 58 ]) |
| 59 ]) |
| 60 ]).scheduleValidate(); |
| 61 }); |
| 62 } |
OLD | NEW |