Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 09d0809

Browse files
committed
Associate #19965 with existing test (#20111)
There is a PR to fix the behavior in FileStream in CoreCLR. This test will pass as per the Windows OS block once that change is taken. Disabling and tracking to allow taking a new drop.
1 parent 10a6570 commit 09d0809

File tree

1 file changed

+6
-13
lines changed
  • src/System.IO.FileSystem/tests/File

1 file changed

+6
-13
lines changed

src/System.IO.FileSystem/tests/File/Copy.cs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,16 @@ public void CopyOntoSelf()
5454
}
5555

5656
[Fact]
57+
[ActiveIssue(19965, TestPlatforms.AnyUnix)]
5758
public void NonExistentPath()
5859
{
5960
FileInfo testFile = new FileInfo(GetTestFilePath());
6061
testFile.Create().Dispose();
61-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
62-
{
63-
Assert.Throws<FileNotFoundException>(() => Copy(GetTestFilePath(), testFile.FullName));
64-
Assert.Throws<DirectoryNotFoundException>(() => Copy(testFile.FullName, Path.Combine(TestDirectory, GetTestFileName(), GetTestFileName())));
65-
Assert.Throws<DirectoryNotFoundException>(() => Copy(Path.Combine(TestDirectory, GetTestFileName(), GetTestFileName()), testFile.FullName));
66-
}
67-
else
68-
{
69-
Assert.Throws<FileNotFoundException>(() => Copy(GetTestFilePath(), testFile.FullName));
70-
Assert.Throws<DirectoryNotFoundException>(() => Copy(testFile.FullName, Path.Combine(TestDirectory, GetTestFileName(), GetTestFileName())));
71-
Assert.Throws<FileNotFoundException>(() => Copy(Path.Combine(TestDirectory, GetTestFileName(), GetTestFileName()), testFile.FullName));
72-
}
73-
}
62+
63+
Assert.Throws<FileNotFoundException>(() => Copy(GetTestFilePath(), testFile.FullName));
64+
Assert.Throws<DirectoryNotFoundException>(() => Copy(testFile.FullName, Path.Combine(TestDirectory, GetTestFileName(), GetTestFileName())));
65+
Assert.Throws<DirectoryNotFoundException>(() => Copy(Path.Combine(TestDirectory, GetTestFileName(), GetTestFileName()), testFile.FullName));
66+
}
7467

7568
[Fact]
7669
public void CopyValid()

0 commit comments

Comments
 (0)