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 mergeSquashLevel(): Level = level(
hints = listOf("Take a look at the `--squash` option of the merge command. Don't forget to commit the merge!"),
commandSuggestions = listOf("git merge --squash long-feature-branch", "git commit -m \"Merge long feature\""),
setup = { RepoState(initialized = true, files = listOf(GitFile("file1", tracked = true)), branches = mapOf("master" to 2, "long-feature-branch" to 4)) },
nativeSetup = {
resetFiles()
write("file1")
addCommit("First commit", "file1")
checkoutNew("long-feature-branch")
write("file3", "some feature\n")
addCommit("Developing new features", "file3")
append("file3", "getting awesomer\n")
addCommit("Takes", "file3")
append("file3", "and awesomer!\n")
addCommit("Time", "file3")
checkout("master")
write("file2")
addCommit("Second commit", "file2")
true
},
validator = repoPredicate { repo -> "merge-squash" in repo.maintenanceActions && repo.commits.isNotEmpty() },
testCases = listOf(
levelTestCase("squash merge then commit", "git merge --squash long-feature-branch", "git commit -m \"Merge long feature\""),