mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 16:59:47 +00:00
[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:
parent
dd837c8ffd
commit
e5f53ce005
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue