Commit 2ad3fd6
fix: MockFileSystem's File.WriteAllText, File.ReadAllText, Directory.GetFiles, Directory.Create fail with \\?\C:\foo style paths (#1305)
* Test that MockDirectory.CreateDirectory supports windows extended-length paths
Windows paths can have a `\\?\` prefix, the '?' character is not always invalid.
Ref: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
Refers to #1304
* Make MockDirectory_CreateDirectory_ShouldSupportExtendedLengthPaths pass
Fixes #1304
* Also test that MockDirectory.CreateDirectory with an extended path returns a DirectoryInfo with an extended path
* Make MockFileSystem's File.WriteAllText, File.ReadAllText and Directory.GetFiles support extended length paths too
* Refactor a little
---------
Co-authored-by: Valentin Breuß <[email protected]>1 parent 021976c commit 2ad3fd6
File tree
2 files changed
+41
-3
lines changed- src/TestableIO.System.IO.Abstractions.TestingHelpers
- tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests
2 files changed
+41
-3
lines changedLines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
| |||
97 | 108 | | |
98 | 109 | | |
99 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
100 | 119 | | |
101 | 120 | | |
102 | 121 | | |
| |||
164 | 183 | | |
165 | 184 | | |
166 | 185 | | |
167 | | - | |
| 186 | + | |
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
750 | 769 | | |
751 | 770 | | |
752 | 771 | | |
| |||
2219 | 2238 | | |
2220 | 2239 | | |
2221 | 2240 | | |
2222 | | - | |
| 2241 | + | |
0 commit comments