We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b608bfc commit dc5fb99Copy full SHA for dc5fb99
tests/Elastic.Markdown.Tests/FileSystemExtensionsTests.cs
@@ -45,10 +45,12 @@ public void HasParentTests()
45
fs.DirectoryInfo.New("/a/b/c/d").HasParent("c").Should().BeTrue();
46
fs.DirectoryInfo.New("/a/b/c/d/e").HasParent("e").Should().BeTrue();
47
48
+ fs.DirectoryInfo.New("/a/b/C/d").HasParent("c", StringComparison.Ordinal).Should().BeFalse();
49
var caseSensitive = IDirectoryInfoExtensions.IsCaseSensitiveFileSystem;
50
51
+ // HasParent is always case-insensitive by default
52
if (caseSensitive)
- fs.DirectoryInfo.New("/a/b/C/d").HasParent("c").Should().BeFalse();
53
+ fs.DirectoryInfo.New("/a/b/C/d").HasParent("c").Should().BeTrue();
54
else
55
fs.DirectoryInfo.New("/a/b/C/d").HasParent("c").Should().BeTrue();
56
}
0 commit comments