Skip to content

Commit

Permalink
[release/6.0] Fix long directory path test (#64955)
Browse files Browse the repository at this point in the history
  • Loading branch information
safern committed Feb 14, 2022
1 parent 5e65919 commit 6dd808f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,10 @@ public void DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException()
{
var paths = IOInputs.GetPathsLongerThanMaxLongPath(GetTestFilePath(), useExtendedSyntax: true);

// Ideally this should be PathTooLongException or DirectoryNotFoundException but on some machines
// windows gives us ERROR_INVALID_NAME, producing IOException.
Assert.All(paths, path =>
AssertExtensions.ThrowsAny<PathTooLongException, DirectoryNotFoundException>(() => Create(path)));
AssertExtensions.ThrowsAny<PathTooLongException, DirectoryNotFoundException, IOException>(() => Create(path)));
}

[ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))]
Expand Down

0 comments on commit 6dd808f

Please sign in to comment.