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,16 @@ internal fun branchAtLevel(): Level = level(
hints = listOf("Just like creating a branch, but you have to pass an extra argument."),
commandSuggestions = listOf("git branch test_branch HEAD~1"),
setup = { RepoState(initialized = true, commits = listOf(CommitNode("1", "Adding file1"), CommitNode("2", "Updating file1"), CommitNode("3", "Updating file1 again")), branches = mapOf("master" to 3)) },
nativeSetup = {
resetFiles()
write("file1")
addCommit("Adding file1", "file1")
write("file1", "content")
addCommit("Updating file1", "file1")
append("file1", "\nAdding some more text")
addCommit("Updating file1 again", "file1")
true
},
validator = repoPredicate { repo -> repo.branches["test_branch"] == 2 },
testCases = listOf(
levelTestCase("branch at previous commit", "git branch test_branch HEAD~1"),