-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make paths case-sensitive on Unix #418
Make paths case-sensitive on Unix #418
Conversation
…stem.IO.Abstractions into unix-case-insensitive
…/System.IO.Abstractions into unix-case-insensitive
@fgreinacher @ericnewton76 thoughts? There's also a comment in there about a pre-existing thing that I had a question about. |
Wow, that’s a lot of improvements, thanks a lot! Please give me one or two days to have a look at this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mine are just nitpicks.
I assume this works correctly, although there's several lines touched that didn't otherwise need be.
…e instead of lower case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look great! I left some nit-picky comments, will merge as soon as those are addressed!
System.IO.Abstractions.TestingHelpers.Tests/MockFileExistsTests.cs
Outdated
Show resolved
Hide resolved
System.IO.Abstractions.TestingHelpers.Tests/MockFileExistsTests.cs
Outdated
Show resolved
Hide resolved
System.IO.Abstractions.TestingHelpers.Tests/MockFileSystemTests.cs
Outdated
Show resolved
Hide resolved
System.IO.Abstractions.TestingHelpers.Tests/MockFileSystemTests.cs
Outdated
Show resolved
Hide resolved
System.IO.Abstractions.TestingHelpers.Tests/MockFileSystemTests.cs
Outdated
Show resolved
Hide resolved
Cleaned up MockFileExistsTests, MockFileSystemTests
Removed WindowsOnly label from the one that that used this reason
because of Windows' stricter path rules
@fgreinacher Covered everything listed so far. Let me know if you see anything else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect now!
Thanks again for all your work on this @rkoeninger 🎉 |
Fixes #321
bool CaseSensitive
,StringComparer Comparer
,StringComparison Comparison
toMockFileSystem
,IMockFileDataAccessor
. The otherMock*
classes use these properties to perform string comparisons and to opt to doToUpper
/ToLower
or not.MockDirectory.GetLogicalDrives()
returns drive letters in upper case instead of lower case.HasIllegalCharacters
,CheckInvalidPathChars
fromMockPath
toPathVerifier
as it's the more appropriate place.IsWindowsPlatform()
toMockUnixSupport
.Func<bool>
argument to methods onMockUnixSupport
that overrides platform detection. Tests that need to run on a specific platform are labeled with the relevant*Only
attribute.WindowsOnly
. Similar tests were added to assert case-sensitive behavior and are labeledUnixOnly
.Fixes #395
MockDirectory.GetParent
for Unix to make sure a slash-root parent is properly identified and returned.UnixOnly
.Fixes #405
MockDirectory.GetFiles
to handle un-normalized slashes: