Skip to content

Commit 6d4b19a

Browse files
committed
Gate the last path-casing test to the platform it describes
EnqueueMatchesRegardlessOfPathCase asserts two paths differing only in case are one entry, which the previous commit made true only where the file system says so. It is the same mistake twice: I fixed the two the Linux legs reported and did not go looking for the rest, and this one lives in the project the arm64 leg does not run. Swept every test project for path casing this time. This was the only one left; the others touching case are about tool names, environment variables and extension matching, none of which changed. Verified by forcing the folding off, building - and checking the build actually succeeded, which the last two attempts at this did not, so they were reporting stale binaries - then listing every failing test. All nine are the RunOn(Windows) ones that real Linux skips, and nothing else moved.
1 parent 7b04b65 commit 6d4b19a

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

src/DiffEngine.Tests/InlineQueueTests.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ public async Task EnqueueReplacesTheSameCallSite()
4545
}
4646

4747
/// <summary>
48-
/// The same path can reach here with different casing, and it is still one call site.
48+
/// The same path can reach here with different casing, and where the file system says those
49+
/// are one file it is still one call site.
4950
/// </summary>
5051
[Test]
52+
[RunOn(TUnit.Core.Enums.OS.Windows)]
5153
public async Task EnqueueMatchesRegardlessOfPathCase()
5254
{
5355
var queue = InlineQueue.Empty
@@ -57,6 +59,21 @@ public async Task EnqueueMatchesRegardlessOfPathCase()
5759
await Assert.That(queue.Count).IsEqualTo(1);
5860
}
5961

62+
/// <summary>
63+
/// And where it says they are two files, two call sites. Matching them everywhere gave both
64+
/// one entry: the second patch replaced the first, and settling either settled both.
65+
/// </summary>
66+
[Test]
67+
[RunOn(TUnit.Core.Enums.OS.Linux)]
68+
public async Task EnqueueKeepsPathCaseApartWhereTheFilesDo()
69+
{
70+
var queue = InlineQueue.Empty
71+
.Enqueue(Patch("Sample.cs"))
72+
.Enqueue(Patch("SAMPLE.CS"));
73+
74+
await Assert.That(queue.Count).IsEqualTo(2);
75+
}
76+
6077
[Test]
6178
public async Task SettleRemoves()
6279
{

0 commit comments

Comments
 (0)