Move native level setups into level files

- Delete NativeLevelFixtures.kt and make native repository setup an optional property of each Level.
- Move every existing native setup into its corresponding level file so setup, validation, and tests stay together.
- Add the missing Blame native setup with config.rb history and a Spider Man password commit.
- Add a native runtime regression that verifies `git blame config.rb` identifies Spider Man on the password line.
- Verify the full JVM test suite using the compiled host Git runtime.
This commit is contained in:
Joe Tretter
2026-05-07 18:53:18 -05:00
parent 7bfb761068
commit 64743ff4a9
30 changed files with 580 additions and 505 deletions

View File

@@ -14,6 +14,20 @@ internal fun squashLevel(): Level = level(
hints = listOf("Take a look at the `-i` flag of the rebase command."),
commandSuggestions = listOf("git rebase -i HEAD~4"),
setup = { RepoState(initialized = true, commits = listOf(CommitNode("1", "Initial Commit"), CommitNode("2", "Adding README"), CommitNode("3", "Updating README (squash this commit into Adding README)"), CommitNode("4", "Updating README (squash this commit into Adding README)"), CommitNode("5", "Updating README (squash this commit into Adding README)")), branches = mapOf("master" to 5)) },
nativeSetup = {
resetFiles()
write(".hidden")
addCommit("Initial Commit", ".hidden")
write("README")
addCommit("Adding README", "README")
write("README", "hey there")
addCommit("Updating README (squash this commit into Adding README)", "README")
append("README", "\nAdding some more text")
addCommit("Updating README (squash this commit into Adding README)", "README")
append("README", "\neven more text")
addCommit("Updating README (squash this commit into Adding README)", "README")
true
},
validator = repoPredicate { repo -> repo.commits.size <= 2 && repo.commits.any { it.message == "Adding README" } },
testCases = listOf(
levelTestCase("interactive squash", "git rebase -i HEAD~4"),