| Index: tests/standalone/io/directory_chdir_test.dart
|
| diff --git a/tests/standalone/io/directory_chdir_test.dart b/tests/standalone/io/directory_chdir_test.dart
|
| index e1c9a1d14ad24a4a71c3c503a904a10478f4cf8a..682698fd424ab6c444f1bcd9d8d1a9ea6cc237de 100644
|
| --- a/tests/standalone/io/directory_chdir_test.dart
|
| +++ b/tests/standalone/io/directory_chdir_test.dart
|
| @@ -26,8 +26,15 @@ testChangeDirectory() {
|
| Directory.current = "..";
|
| Expect.isTrue(new File("111").existsSync());
|
| Expect.isTrue(new File("222/333").existsSync());
|
| + // Deleting the current working directory causes an error.
|
| + // On Windows, the deletion fails, and on non-Windows, the getter fails.
|
| + Expect.throws(() {
|
| + temp.deleteSync(recursive: true);
|
| + Directory.current;
|
| + }, (e) => e is DirectoryException);
|
| Directory.current = initialCurrent;
|
| - temp.deleteSync(recursive: true);
|
| + Directory.current;
|
| + if (temp.existsSync()) temp.deleteSync(recursive: true);
|
| asyncEnd();
|
| });
|
| }
|
|
|