| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 }); | 244 }); |
| 245 }); | 245 }); |
| 246 }); | 246 }); |
| 247 }); | 247 }); |
| 248 }); | 248 }); |
| 249 }); | 249 }); |
| 250 } | 250 } |
| 251 | 251 |
| 252 static void testExistsCreateDeleteSync() { | 252 static void testExistsCreateDeleteSync() { |
| 253 Directory d = new Directory("").createTempSync(); | 253 Directory d = new Directory("").createTempSync(); |
| 254 Directory d2 = new Directory('${d.path}/'); |
| 254 Expect.isTrue(d.existsSync()); | 255 Expect.isTrue(d.existsSync()); |
| 256 Expect.isTrue(d2.existsSync()); |
| 255 Directory created = new Directory("${d.path}/subdir"); | 257 Directory created = new Directory("${d.path}/subdir"); |
| 256 created.createSync(); | 258 created.createSync(); |
| 257 Expect.isTrue(created.existsSync()); | 259 Expect.isTrue(created.existsSync()); |
| 258 created.deleteSync(); | 260 created.deleteSync(); |
| 259 Expect.isFalse(created.existsSync()); | 261 Expect.isFalse(created.existsSync()); |
| 260 d.deleteSync(); | 262 d.deleteSync(); |
| 261 Expect.isFalse(d.existsSync()); | 263 Expect.isFalse(d.existsSync()); |
| 262 } | 264 } |
| 263 | 265 |
| 264 static void testCreateTemp() { | 266 static void testCreateTemp() { |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 }); | 478 }); |
| 477 } | 479 } |
| 478 | 480 |
| 479 main() { | 481 main() { |
| 480 DirectoryTest.testMain(); | 482 DirectoryTest.testMain(); |
| 481 NestedTempDirectoryTest.testMain(); | 483 NestedTempDirectoryTest.testMain(); |
| 482 testCreateTempErrorSync(); | 484 testCreateTempErrorSync(); |
| 483 testCreateTempError(); | 485 testCreateTempError(); |
| 484 testRename(); | 486 testRename(); |
| 485 } | 487 } |
| OLD | NEW |