[io] Add tests for failure to resolve a path using FileSystemEntity.resolveSymbolicLinks.

Bug:https://github.com/dart-lang/sdk/issues/53862
Change-Id: I269668064657856f2c2aa3479618b206aad075aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347204
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
Brian Quinlan 2024-01-19 01:47:49 +00:00 committed by Commit Queue
parent dd837c8ffd
commit e5f53ce005

View file

@ -96,6 +96,7 @@ main() {
});
}));
asyncTest(testNonExistantPath);
asyncTest(testLinkTargetTypeChangedAfterCreation);
}
@ -157,6 +158,13 @@ Future testLink(String name) {
});
}
Future testNonExistantPath() async {
try {
await File('/tmp/foo/doesnotexist').resolveSymbolicLinks();
Expect.fail("expected FileSystemException");
} on FileSystemException {}
}
Future testLinkTargetTypeChangedAfterCreation() async {
// Test the following scenario:
// 1. create a file