Skip to content

Commit dc5fb99

Browse files
committed
update tests
1 parent b608bfc commit dc5fb99

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Elastic.Markdown.Tests/FileSystemExtensionsTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ public void HasParentTests()
4545
fs.DirectoryInfo.New("/a/b/c/d").HasParent("c").Should().BeTrue();
4646
fs.DirectoryInfo.New("/a/b/c/d/e").HasParent("e").Should().BeTrue();
4747

48+
fs.DirectoryInfo.New("/a/b/C/d").HasParent("c", StringComparison.Ordinal).Should().BeFalse();
4849
var caseSensitive = IDirectoryInfoExtensions.IsCaseSensitiveFileSystem;
4950

51+
// HasParent is always case-insensitive by default
5052
if (caseSensitive)
51-
fs.DirectoryInfo.New("/a/b/C/d").HasParent("c").Should().BeFalse();
53+
fs.DirectoryInfo.New("/a/b/C/d").HasParent("c").Should().BeTrue();
5254
else
5355
fs.DirectoryInfo.New("/a/b/C/d").HasParent("c").Should().BeTrue();
5456
}

0 commit comments

Comments
 (0)