| 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 "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 import "dart:async"; | 8 import "dart:async"; |
| 9 import "dart:io"; | 9 import "dart:io"; |
| 10 import "dart:isolate"; | 10 import "dart:isolate"; |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 file.delete().then((ignore) { | 373 file.delete().then((ignore) { |
| 374 tempDirectory.deleteSync(); | 374 tempDirectory.deleteSync(); |
| 375 Expect.isFalse(tempDirectory.existsSync()); | 375 Expect.isFalse(tempDirectory.existsSync()); |
| 376 }); | 376 }); |
| 377 }); | 377 }); |
| 378 }); | 378 }); |
| 379 }); | 379 }); |
| 380 } | 380 } |
| 381 | 381 |
| 382 static void testCurrent() { | 382 static void testCurrent() { |
| 383 Directory current = new Directory.current(); | 383 Directory current = 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(name); | 392 var path = new Path(name); |
| 393 Directory current2 = new Directory.fromPath(path); | 393 Directory current2 = new Directory.fromPath(path); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 testCreateTempErrorSync(); | 615 testCreateTempErrorSync(); |
| 616 testCreateTempError(); | 616 testCreateTempError(); |
| 617 testCreateExistingSync(); | 617 testCreateExistingSync(); |
| 618 testCreateExisting(); | 618 testCreateExisting(); |
| 619 testCreateDirExistingFileSync(); | 619 testCreateDirExistingFileSync(); |
| 620 testCreateDirExistingFile(); | 620 testCreateDirExistingFile(); |
| 621 testCreateRecursive(); | 621 testCreateRecursive(); |
| 622 testCreateRecursiveSync(); | 622 testCreateRecursiveSync(); |
| 623 testRename(); | 623 testRename(); |
| 624 } | 624 } |
| OLD | NEW |