| Index: tests/standalone/io/file_system_links_test.dart
|
| diff --git a/tests/standalone/io/file_system_links_test.dart b/tests/standalone/io/file_system_links_test.dart
|
| index 6f19a56d28fd26c9f68555389b8e6aec46cfc4f4..453ebb5fbda2327fead13d238ec7db5af3e57f85 100644
|
| --- a/tests/standalone/io/file_system_links_test.dart
|
| +++ b/tests/standalone/io/file_system_links_test.dart
|
| @@ -143,6 +143,33 @@ testDirectoryListing() {
|
| }
|
|
|
|
|
| +testDirectoryListingBrokenLink() {
|
| + var temp = new Directory('').createTempSync();
|
| + var x = '${temp.path}${Platform.pathSeparator}x';
|
| + var link = '${temp.path}${Platform.pathSeparator}link';
|
| + var doesNotExist = 'this_thing_does_not_exist';
|
| + new File(x).createSync();
|
| + createLink(doesNotExist, link, true, () {
|
| + var files = [];
|
| + var dirs = [];
|
| + var errors = [];
|
| + var lister = temp.list(recursive: true);
|
| + lister.onFile = (f) => files.add(f);
|
| + lister.onDir = (d) => dirs.add(d);
|
| + lister.onError = (d) => errors.add(d);
|
| + lister.onDone = (success) {
|
| + Expect.isFalse(success);
|
| + Expect.equals(1, files.length);
|
| + Expect.isTrue(files[0].endsWith(x));
|
| + Expect.equals(0, dirs.length);
|
| + Expect.equals(1, errors.length);
|
| + Expect.isTrue(errors[0].toString().contains(link));
|
| + temp.deleteRecursivelySync();
|
| + };
|
| + });
|
| +}
|
| +
|
| +
|
| main() {
|
| testFileExistsCreate();
|
| testFileDelete();
|
| @@ -150,4 +177,5 @@ main() {
|
| testDirectoryExistsCreate();
|
| testDirectoryDelete();
|
| testDirectoryListing();
|
| + testDirectoryListingBrokenLink();
|
| }
|
|
|