OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 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 | 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 // Test the Path class in dart:io. | 5 // Test the Path class in dart:io. |
6 | 6 |
7 #import("dart:io"); | 7 import "dart:io"; |
8 | 8 |
9 void main() { | 9 void main() { |
10 testBaseFunctions(); | 10 testBaseFunctions(); |
11 testCanonicalize(); | 11 testCanonicalize(); |
12 testJoinAppend(); | 12 testJoinAppend(); |
13 testRelativeTo(); | 13 testRelativeTo(); |
14 testWindowsShare(); | 14 testWindowsShare(); |
15 } | 15 } |
16 | 16 |
17 void testBaseFunctions() { | 17 void testBaseFunctions() { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 Expect.isTrue(canonical.toString().startsWith('/share/a')); | 221 Expect.isTrue(canonical.toString().startsWith('/share/a')); |
222 Expect.isTrue(canonical.toNativePath().startsWith(r'\\share\a')); | 222 Expect.isTrue(canonical.toNativePath().startsWith(r'\\share\a')); |
223 Expect.listEquals(['share', 'a', 'c'], canonical.segments()); | 223 Expect.listEquals(['share', 'a', 'c'], canonical.segments()); |
224 var appended = canonical.append('d'); | 224 var appended = canonical.append('d'); |
225 Expect.isTrue(appended.isAbsolute); | 225 Expect.isTrue(appended.isAbsolute); |
226 Expect.isTrue(appended.isWindowsShare); | 226 Expect.isTrue(appended.isWindowsShare); |
227 var directoryPath = canonical.directoryPath; | 227 var directoryPath = canonical.directoryPath; |
228 Expect.isTrue(directoryPath.isAbsolute); | 228 Expect.isTrue(directoryPath.isAbsolute); |
229 Expect.isTrue(directoryPath.isWindowsShare); | 229 Expect.isTrue(directoryPath.isWindowsShare); |
230 } | 230 } |
OLD | NEW |