Index: utils/tests/pub/io_test.dart |
diff --git a/utils/tests/pub/io_test.dart b/utils/tests/pub/io_test.dart |
index a1825af54803782e7f9b703ff35ae68bfcc14087..783ca4aaf3744fbaca09b32847807353a6fc1aa1 100644 |
--- a/utils/tests/pub/io_test.dart |
+++ b/utils/tests/pub/io_test.dart |
@@ -119,6 +119,20 @@ main() { |
])); |
}), completes); |
}); |
+ |
+ test('treats a broken symlink as a file', () { |
+ expect(withTempDir((temp) { |
+ writeTextFile(path.join(temp, 'file1.txt'), ''); |
+ createDir(path.join(temp, 'dir')); |
+ createSymlink(path.join(temp, 'dir'), path.join(temp, 'linkdir')); |
+ deleteEntry(path.join(temp, 'dir')); |
+ |
+ expect(listDir(temp, recursive: true), unorderedEquals([ |
+ path.join(temp, 'file1.txt'), |
+ path.join(temp, 'linkdir') |
+ ])); |
+ }), completes); |
+ }); |
}); |
testExistencePredicate("entryExists", entryExists, |