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:
@@ -232,6 +232,27 @@ class GitSandboxEngineTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun nativeBlameLevelShowsPasswordAuthor() {
|
||||
val git = testGitBinary()
|
||||
assumeTrue(git.exists() && git.canExecute())
|
||||
val root = Files.createTempDirectory("githug-blame-level").toFile()
|
||||
try {
|
||||
val runtime = GitRepositoryRuntime(root, git)
|
||||
val level = blameLevel()
|
||||
val repo = runtime.prepareLevel(level)
|
||||
|
||||
assertTrue(repo.files.single { it.name == "config.rb" }.content.contains("password"))
|
||||
|
||||
val (_, blameOutput) = runtime.execute(level, repo, "git blame config.rb")
|
||||
|
||||
assertTrue(blameOutput.any { it.contains("Spider Man") && it.contains("password") })
|
||||
assertTrue(level.validator(repo, "Spider Man"))
|
||||
} finally {
|
||||
root.deleteRecursively()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cdDotDotShortcutMovesToParentDirectory() {
|
||||
val repo = RepoState(initialized = true, currentDir = "src/main")
|
||||
|
||||
Reference in New Issue
Block a user