From d0f686e39121d163b7049a1f3c7b862bef86ef7f Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 11 Nov 2026 01:49:32 +0000
Subject: [PATCH 01/11] chore(deps): update dependency awexpect to v4 (#1580)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 3042423b8..8072c8e8b 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -27,7 +27,7 @@
-
+
From f9e5b196ae2f5c38a59ccae029e63893140952ca Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 11 Nov 2026 05:17:45 +0000
Subject: [PATCH 02/11] chore(deps): update dependency awexpect.testably to v3
(#1582)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 8072c8e8b..43806c173 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -28,7 +28,7 @@
-
+
From 71d986e45f8afbda209685ba63da2c3b9bbdda19 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 11 Nov 2026 18:22:03 +0000
Subject: [PATCH 03/11] chore(deps): update dependency microsoft.net.test.sdk
to 18.12.0 (#1583)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 43806c173..7e8c5b5b9 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -21,7 +21,7 @@
-
+
From caf1f0aa49b45fae767767644f3c2175fde09528 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 12 Nov 2026 20:10:08 +0000
Subject: [PATCH 04/11] chore(deps): update dependency sharpcompress to 0.50.9
(#1584)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 7e8c5b5b9..103df974e 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -35,6 +35,6 @@
-
+
From 970665b4299a463a3a4410636807d4fcf2188afc Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Fri, 13 Nov 2026 22:45:29 +0000
Subject: [PATCH 05/11] chore(deps): update dependency awexpect to 4.1.0
(#1585)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 103df974e..37bce6ca7 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -27,7 +27,7 @@
-
+
From 033275d2613dafc331814800263b52357b5a6542 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Sat, 14 Nov 2026 11:48:57 +0000
Subject: [PATCH 06/11] chore(deps): update dependency mockolate to v4 (#1586)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 37bce6ca7..9ba7a6f9f 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -22,7 +22,7 @@
-
+
From 5cfef2f48259d5d6724d8c81012d36998b195d79 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Sat, 14 Nov 2026 16:54:16 +0000
Subject: [PATCH 07/11] chore(deps): update dependency awexpect.mockolate to v4
(#1587)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 9ba7a6f9f..723937eda 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -29,7 +29,7 @@
-
+
From 20bb59576250cfb9f488ab335dd9339d6e614d12 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Sun, 15 Nov 2026 14:10:26 +0000
Subject: [PATCH 08/11] chore(deps): update dependency awexpect to 4.2.0
(#1588)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 723937eda..e5c3ef9a4 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -27,7 +27,7 @@
-
+
From b10fe47366fa558b21ed9a3fc6c26797ad50bd0b Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 16 Nov 2026 00:45:56 +0000
Subject: [PATCH 09/11] chore(deps): update dependency coverlet.collector to
10.1.1 (#1589)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index e5c3ef9a4..095163e67 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -19,7 +19,7 @@
-
+
From 67e858581ba64e8cae9a2fcc8d763ae3105e7b9b Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 16 Nov 2026 13:16:02 +0000
Subject: [PATCH 10/11] chore(deps): update dependency mockolate to 4.1.0
(#1590)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 095163e67..df136e05d 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -22,7 +22,7 @@
-
+
From c12f3b1dd05fb5728f838a9bfcf5203d9c4eeb67 Mon Sep 17 00:00:00 2001
From: Mohsin Ali
Date: Tue, 17 Nov 2026 17:36:04 +0500
Subject: [PATCH 11/11] fix: name the Unix root drive `/` instead of `/:\`
(#1591)
Fixes #927
On Linux and macOS, `MockFileSystem.DriveInfo.GetDrives()` returned the root twice, both named `/:\`, and `DriveInfo.New("/").Name` was `/:\`. The real `DriveInfo` gives `/`.
**What was wrong**
`PathVerifier.TryNormalizeDriveName` has a shortcut for one-character names: it treats the character as a drive letter and appends `:\`, so `/` became `/:\`. The root then got registered twice: as `/` for paths like `/foo/bar.txt` (through `GetPathRoot`), and as `/:\` for the `/` directory entry itself (through the shortcut). `MockDriveInfo` named both of them `/:\`, and `RootDirectory` of that drive pointed at `/:`.
**What changed**
The one-character shortcut now only applies to letters, using `char.IsLetter` like `TrimSlashes` and `IsValidUseOfVolumeSeparatorChar` already do for drive letters. `/` now goes through `GetPathRoot` like longer paths and stays `/`. Both registrations end up under the same key, so `GetDrives()` returns a single drive named `/`.
Drive letters (`c`, `c:`, `c:\`) still take the shortcut, and UNC and `\\?\` paths never reached it, so Windows drives are handled as before. The only other inputs that change are single non-letter characters passed in directly. They now go through `GetPathRoot` as well, so `1` throws `ArgumentException` (as the real `DriveInfo` does on Windows) instead of becoming `1:\`, and on Windows `\` stays `\` instead of becoming `\:\`.
**How it's tested**
I added two Unix-only tests to `MockFileSystemTests`, next to the Windows-only `MockFileSystem_Constructor_ShouldNotDuplicateDrives`:
- after adding `/foo/bar.txt`, `GetDrives()` returns exactly one drive, named `/`
- `DriveInfo.New("/").Name` is `/`
Both fail on `main` and pass with the fix. They aren't in `MockDriveInfoFactoryTests` because that whole class is Windows-only.
I ran this on Linux in the `mcr.microsoft.com/dotnet/sdk:11.0.100` container, with the .NET 10, 9 and 8 runtimes added. The Release build of the solution has no warnings or errors. The Wrappers, TestingHelpers and Parity tests all pass on net11.0, net10.0, net9.0 and net8.0, and the API tests pass too.
I couldn't run the Windows tests or net472. The existing Windows-only drive tests (`MockDriveInfoTests`, `MockDriveInfoFactoryTests` and the drive tests in `MockFileSystemTests`) cover that path, so CI on Windows should confirm it is unchanged.
---
.../PathVerifier.cs | 2 +-
.../MockFileSystemTests.cs | 23 +++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/src/TestableIO.System.IO.Abstractions.TestingHelpers/PathVerifier.cs b/src/TestableIO.System.IO.Abstractions.TestingHelpers/PathVerifier.cs
index 45848c605..8034b1bc1 100644
--- a/src/TestableIO.System.IO.Abstractions.TestingHelpers/PathVerifier.cs
+++ b/src/TestableIO.System.IO.Abstractions.TestingHelpers/PathVerifier.cs
@@ -162,7 +162,7 @@ public bool TryNormalizeDriveName(string name, out string result)
const string DRIVE_SEPARATOR = @":\";
- if (name.Length == 1
+ if ((name.Length == 1 && char.IsLetter(name[0]))
|| (name.Length == 2 && name[1] == ':')
|| (name.Length == 3 && _mockFileDataAccessor.StringOperations.EndsWith(name, DRIVE_SEPARATOR)))
{
diff --git a/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileSystemTests.cs b/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileSystemTests.cs
index 7252317cd..333ef42d3 100644
--- a/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileSystemTests.cs
+++ b/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileSystemTests.cs
@@ -507,6 +507,29 @@ public async Task MockFileSystem_Constructor_ShouldNotDuplicateDrives()
await That(drivesInfo.Where(d => string.Equals(d.Name, @"D:\", StringComparison.InvariantCultureIgnoreCase))).HasCount().EqualTo(1);
}
+ [Test]
+ [UnixOnly(UnixSpecifics.SlashRoot)]
+ public async Task MockFileSystem_DriveInfo_GetDrives_ShouldReturnSlashRootOnce()
+ {
+ var fileSystem = new MockFileSystem();
+ fileSystem.AddFile("/foo/bar.txt", new MockFileData(string.Empty));
+
+ var driveNames = fileSystem.DriveInfo.GetDrives().Select(d => d.Name);
+
+ await That(driveNames).IsEqualTo(new[] { "/" });
+ }
+
+ [Test]
+ [UnixOnly(UnixSpecifics.SlashRoot)]
+ public async Task MockFileSystem_DriveInfo_New_WithSlash_ShouldReturnSlashRoot()
+ {
+ var fileSystem = new MockFileSystem();
+
+ var driveInfo = fileSystem.DriveInfo.New("/");
+
+ await That(driveInfo.Name).IsEqualTo("/");
+ }
+
[Test]
public async Task MockFileSystem_DefaultState_DefaultTempDirectoryExists()
{