diff --git a/test/Ayaka.Nuke.Tests/PublicApi/IgnoreCaseWhenPossibleComparer.cs b/test/Ayaka.Nuke.Tests/PublicApi/IgnoreCaseWhenPossibleComparer.cs index e95542c..b57b802 100644 --- a/test/Ayaka.Nuke.Tests/PublicApi/IgnoreCaseWhenPossibleComparer.cs +++ b/test/Ayaka.Nuke.Tests/PublicApi/IgnoreCaseWhenPossibleComparer.cs @@ -15,7 +15,7 @@ public void Does_sort_lines() "Ayaka.Nuke.DotNet.IHaveDotNetPackTarget", "Ayaka.Nuke.DotNet.ICanDotNetBuild.DotNetBuildSettingsBase.get -> Nuke.Common.Tooling.Configure!", "Ayaka.Nuke.DotNet.ICanDotNetBuild", - "ayaka.nuke.extensions", + "Ayaka.Nuke.Extensions", "Ayaka.Nuke.DotNet.ICanDotNetBuild.DotNetBuildSettings.get -> Nuke.Common.Tooling.Configure!" ]; @@ -30,7 +30,30 @@ public void Does_sort_lines() "Ayaka.Nuke.DotNet.ICanDotNetBuild.DotNetBuildSettings.get -> Nuke.Common.Tooling.Configure!", "Ayaka.Nuke.DotNet.ICanDotNetBuild.DotNetBuildSettingsBase.get -> Nuke.Common.Tooling.Configure!", "Ayaka.Nuke.DotNet.IHaveDotNetPackTarget", - "ayaka.nuke.extensions" + "Ayaka.Nuke.Extensions" + ], + o => o.WithStrictOrdering()); + } + + [Fact] + public void Does_fallback_to_case_sensitive() + { + List lines = + [ + "ayaka.nuke.extensions", + "Ayaka.Nuke.DotNet.ICanDotNetBuild", + "Ayaka.Nuke.Extensions" + ]; + + lines.Sort(IgnoreCaseWhenPossibleComparer.Instance); + + lines + .Should() + .BeEquivalentTo( + [ + "Ayaka.Nuke.DotNet.ICanDotNetBuild", + "Ayaka.Nuke.Extensions", + "ayaka.nuke.extensions", ], o => o.WithStrictOrdering()); }