| Index: tests/standalone/io/directory_test.dart
|
| diff --git a/tests/standalone/io/directory_test.dart b/tests/standalone/io/directory_test.dart
|
| index 88e7b1af746b31deeaf95b83b9d9edf93fc4373e..139c8692f0bde607ec8c3810294f2114ec3b6d9e 100644
|
| --- a/tests/standalone/io/directory_test.dart
|
| +++ b/tests/standalone/io/directory_test.dart
|
| @@ -407,9 +407,30 @@ testCreateTempError() {
|
| }
|
|
|
|
|
| +testRename() {
|
| + var d = new Directory('');
|
| + var temp1 = d.createTempSync();
|
| + var temp2 = d.createTempSync();
|
| + var temp3 = temp1.renameSync(temp2.path);
|
| + Expect.isFalse(temp1.existsSync());
|
| + Expect.isTrue(temp2.existsSync());
|
| + Expect.equals(temp3.path, temp2.path);
|
| +
|
| + temp2.rename(temp1.path).then((temp4) {
|
| + Expect.isFalse(temp3.existsSync());
|
| + Expect.isFalse(temp2.existsSync());
|
| + Expect.isTrue(temp1.existsSync());
|
| + Expect.isTrue(temp4.existsSync());
|
| + Expect.equals(temp1.path, temp4.path);
|
| + temp1.deleteRecursivelySync();
|
| + });
|
| +}
|
| +
|
| +
|
| main() {
|
| DirectoryTest.testMain();
|
| NestedTempDirectoryTest.testMain();
|
| testCreateTempErrorSync();
|
| testCreateTempError();
|
| + testRename();
|
| }
|
|
|