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,22 @@ internal fun rebaseOntoLevel(): Level = level(
hints = listOf("You want to research the `git rebase` commands `--onto` argument"),
commandSuggestions = listOf("git rebase --onto master wrong_branch readme-update"),
setup = { RepoState(initialized = true, headBranch = "readme-update", branches = mapOf("master" to 1, "wrong_branch" to 2, "readme-update" to 4)) },
nativeSetup = {
resetFiles()
write("authors.md", "https://github.com/janis-vitols\n")
addCommit("Create authors file", "authors.md")
checkoutNew("wrong_branch")
write("authors.md", "None\n")
addCommit("Wrong changes", "authors.md")
checkoutNew("readme-update")
write("README.md", "# SuperApp\n")
addCommit("Add app name in readme", "README.md")
append("README.md", "## About\n")
addCommit("Add `About` header in readme", "README.md")
append("README.md", "## Install\n")
addCommit("Add `Install` header in readme", "README.md")
true
},
validator = repoPredicate { repo -> repo.headBranch == "readme-update" && "rebase-onto" in repo.maintenanceActions },
testCases = listOf(
levelTestCase("rebase onto explicit branch", "git rebase --onto master wrong_branch readme-update"),