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

Commit f759243

Browse files
authored
Tests for Directory Exists (#28732)
1 parent bd8c8ed commit f759243

File tree

1 file changed

+10
-1
lines changed
  • src/System.IO.FileSystem/tests/Directory

1 file changed

+10
-1
lines changed

src/System.IO.FileSystem/tests/Directory/Exists.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,18 @@ public void SubdirectoryOnNotReadyDriveAsPath_ReturnsFalse()
377377

378378
[Fact]
379379
[PlatformSpecific(TestPlatforms.Windows)] // drive labels
380-
public void NonExistentDriveAsPath_ReturnsFalse()
380+
public void DriveAsPath()
381381
{
382382
Assert.False(Exists(IOServices.GetNonExistentDrive()));
383+
Assert.All(IOServices.GetReadyDrives(), drive => Assert.True(Exists(drive)));
384+
}
385+
386+
[ConditionalFact(nameof(UsingNewNormalization))]
387+
[PlatformSpecific(TestPlatforms.Windows)] // drive labels
388+
public void ExtendedDriveAsPath()
389+
{
390+
Assert.False(Exists(IOInputs.ExtendedPrefix + IOServices.GetNonExistentDrive()));
391+
Assert.All(IOServices.GetReadyDrives(), drive => Assert.True(Exists(IOInputs.ExtendedPrefix + drive)));
383392
}
384393

385394
[Fact]

0 commit comments

Comments
 (0)