OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import "dart:async"; | 5 import "dart:async"; |
6 import "dart:io"; | 6 import "dart:io"; |
7 | 7 |
8 import "package:async_helper/async_helper.dart"; | 8 import "package:async_helper/async_helper.dart"; |
9 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
10 import "package:path/path.dart"; | 10 import "package:path/path.dart"; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( | 97 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( |
98 link, | 98 link, |
99 link))) | 99 link))) |
100 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( | 100 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( |
101 target, | 101 target, |
102 target))) | 102 target))) |
103 .then((_) => new Link(link).target()) | 103 .then((_) => new Link(link).target()) |
104 .then((linkTarget) => FutureExpect.isTrue(FileSystemEntity.identical( | 104 .then((linkTarget) => FutureExpect.isTrue(FileSystemEntity.identical( |
105 target, | 105 target, |
106 linkTarget))) | 106 linkTarget))) |
107 .then((_) => new File(".").fullPath()) | 107 .then((_) => new File(".").resolveSymbolicLinks()) |
108 .then((fullCurrentDir) => FutureExpect.isTrue(FileSystemEntity.identical( | 108 .then((fullCurrentDir) => FutureExpect.isTrue(FileSystemEntity.identical( |
109 ".", | 109 ".", |
110 fullCurrentDir))) | 110 fullCurrentDir))) |
111 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( | 111 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( |
112 createdFile, | 112 createdFile, |
113 createdFile))) | 113 createdFile))) |
114 .then((_) => FutureExpect.isFalse(FileSystemEntity.identical( | 114 .then((_) => FutureExpect.isFalse(FileSystemEntity.identical( |
115 createdFile, | 115 createdFile, |
116 createdDirectly))) | 116 createdDirectly))) |
117 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( | 117 .then((_) => FutureExpect.isTrue(FileSystemEntity.identical( |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 313 } |
314 | 314 |
315 main() { | 315 main() { |
316 asyncStart(); | 316 asyncStart(); |
317 testCreate() | 317 testCreate() |
318 .then(testCreateLoopingLink) | 318 .then(testCreateLoopingLink) |
319 .then(testRename) | 319 .then(testRename) |
320 .then(testRelativeLinks) | 320 .then(testRelativeLinks) |
321 .then((_) => asyncEnd()); | 321 .then((_) => asyncEnd()); |
322 } | 322 } |
OLD | NEW |