Skip to content

Commit 5d32132

Browse files
committed
Fix test file references to match DSL-created filenames
The test DSL's sanitize() lowercases commit titles when creating files, so commit "B" creates b.txt. Tests were referencing B.txt and C.txt (uppercase), which works on macOS (case-insensitive) but would fail on case-sensitive filesystems. commit-id: Ifee0d4b9
1 parent c4c6351 commit 5d32132

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎git-jaspr/src/test/kotlin/sims/michael/gitjaspr/GitJasprTest.kt‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,8 @@ interface GitJasprTest {
11031103
gitJaspr.navigateToBottom(DEFAULT_TARGET_REF)
11041104

11051105
// Amend A to include B's file content, making B's cherry-pick empty
1106-
localRepo.resolve("B.txt").writeText("Title: B\n")
1107-
localGit.add("B.txt")
1106+
localRepo.resolve("b.txt").writeText("Title: B\n")
1107+
localGit.add("b.txt")
11081108
localGit.commit("A", footerLines = mapOf(COMMIT_ID_LABEL to "A"), amend = true)
11091109

11101110
val result = gitJaspr.navigateToTop(DEFAULT_TARGET_REF)
@@ -1115,7 +1115,7 @@ interface GitJasprTest {
11151115
assertFalse(localGit.isHeadDetached())
11161116

11171117
// C's content is present (it was replayed successfully even though B was skipped)
1118-
assertTrue(localRepo.resolve("C.txt").exists())
1118+
assertTrue(localRepo.resolve("c.txt").exists())
11191119
}
11201120
}
11211121

@@ -1690,7 +1690,7 @@ interface GitJasprTest {
16901690
assertNotNull(gitJaspr.readSplitState())
16911691

16921692
// B's file should still be in the working tree
1693-
assertTrue(localRepo.resolve("B.txt").exists())
1693+
assertTrue(localRepo.resolve("b.txt").exists())
16941694
}
16951695
}
16961696

@@ -1761,7 +1761,7 @@ interface GitJasprTest {
17611761
gitJaspr.split()
17621762

17631763
// Create two new commits from the split
1764-
localGit.add("B.txt")
1764+
localGit.add("b.txt")
17651765
localGit.commit("B-part1", footerLines = mapOf(COMMIT_ID_LABEL to "B-part1"))
17661766
localRepo.resolve("extra.txt").writeText("extra\n")
17671767
localGit.add("extra.txt")
@@ -1870,7 +1870,7 @@ interface GitJasprTest {
18701870
gitJaspr.split()
18711871

18721872
// Modify the working tree — remove B's file, add a new one
1873-
localRepo.resolve("B.txt").delete()
1873+
localRepo.resolve("b.txt").delete()
18741874
localRepo.resolve("new_file.txt").writeText("new content\n")
18751875

18761876
// Unsplit: absorb changes back into B
@@ -1883,7 +1883,7 @@ interface GitJasprTest {
18831883
assertNotEquals(originalB, head.hash)
18841884

18851885
// The working tree should reflect the modifications
1886-
assertFalse(localRepo.resolve("B.txt").exists())
1886+
assertFalse(localRepo.resolve("b.txt").exists())
18871887
assertTrue(localRepo.resolve("new_file.txt").exists())
18881888
}
18891889
}
@@ -2670,7 +2670,7 @@ interface GitJasprTest {
26702670
assertEquals("A", head.id)
26712671

26722672
// A should contain B's file
2673-
assertTrue(localRepo.resolve("B.txt").exists())
2673+
assertTrue(localRepo.resolve("b.txt").exists())
26742674

26752675
// Nav state: B removed, cursor at 0 (A)
26762676
val state = gitJaspr.readNavState()
@@ -2705,7 +2705,7 @@ interface GitJasprTest {
27052705
assertFalse(localGit.isHeadDetached())
27062706

27072707
// A should contain B's file
2708-
assertTrue(localRepo.resolve("B.txt").exists())
2708+
assertTrue(localRepo.resolve("b.txt").exists())
27092709
}
27102710
}
27112711

@@ -2742,7 +2742,7 @@ interface GitJasprTest {
27422742
assertEquals("C", head.id)
27432743

27442744
// C should contain B's file
2745-
assertTrue(localRepo.resolve("B.txt").exists())
2745+
assertTrue(localRepo.resolve("b.txt").exists())
27462746

27472747
// Nav state: B removed, C at cursor position
27482748
val state = gitJaspr.readNavState()

0 commit comments

Comments
 (0)