| 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 // Directory listing test. | 5 // Directory listing test. |
| 6 | 6 |
| 7 import "dart:io"; | 7 import "dart:io"; |
| 8 import "dart:isolate"; | 8 import "dart:isolate"; |
| 9 | 9 |
| 10 class DirectoryTest { | 10 class DirectoryTest { |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 static void testCurrent() { | 382 static void testCurrent() { |
| 383 Directory current = new Directory.current(); | 383 Directory current = new Directory.current(); |
| 384 if (Platform.operatingSystem != "windows") { | 384 if (Platform.operatingSystem != "windows") { |
| 385 Expect.equals("/", current.path.substring(0, 1)); | 385 Expect.equals("/", current.path.substring(0, 1)); |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 | 388 |
| 389 static void testFromPath() { | 389 static void testFromPath() { |
| 390 var name = new File('.').fullPathSync(); | 390 var name = new File('.').fullPathSync(); |
| 391 Directory current1 = new Directory(name); | 391 Directory current1 = new Directory(name); |
| 392 var path = new Path.fromNative(name); | 392 var path = new Path(name); |
| 393 Directory current2 = new Directory.fromPath(path); | 393 Directory current2 = new Directory.fromPath(path); |
| 394 Expect.equals(current1.path, current2.path); | 394 Expect.equals(current1.path, current2.path); |
| 395 Expect.isTrue(current1.existsSync()); | 395 Expect.isTrue(current1.existsSync()); |
| 396 } | 396 } |
| 397 | 397 |
| 398 static void testMain() { | 398 static void testMain() { |
| 399 testListing(); | 399 testListing(); |
| 400 testListNonExistent(); | 400 testListNonExistent(); |
| 401 testListTooLongName(); | 401 testListTooLongName(); |
| 402 testDeleteNonExistent(); | 402 testDeleteNonExistent(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 testCreateTempErrorSync(); | 611 testCreateTempErrorSync(); |
| 612 testCreateTempError(); | 612 testCreateTempError(); |
| 613 testCreateExistingSync(); | 613 testCreateExistingSync(); |
| 614 testCreateExisting(); | 614 testCreateExisting(); |
| 615 testCreateDirExistingFileSync(); | 615 testCreateDirExistingFileSync(); |
| 616 testCreateDirExistingFile(); | 616 testCreateDirExistingFile(); |
| 617 testCreateRecursive(); | 617 testCreateRecursive(); |
| 618 testCreateRecursiveSync(); | 618 testCreateRecursiveSync(); |
| 619 testRename(); | 619 testRename(); |
| 620 } | 620 } |
| OLD | NEW |