Make bisect playable and validate commit_in_future using Git author timestamps

This commit is contained in:
Joe Tretter
2026-05-18 19:44:23 -05:00
parent f5bd5f5a60
commit afb548d46f
10 changed files with 256 additions and 36 deletions

View File

@@ -411,6 +411,24 @@ class GitSandboxEngineTest {
}
}
@Test
fun nativeExecutableShortcutRunsScriptThroughShell() {
val git = testGitBinary()
assumeTrue(git.exists() && git.canExecute())
val root = Files.createTempDirectory("githug-script-shortcut").toFile()
try {
val runtime = GitRepositoryRuntime(root, git)
val level = bisectLevel()
val repo = runtime.prepareLevel(level)
val (_, output) = runtime.execute(level, repo, "./test-balance.sh")
assertTrue(output.joinToString("\n"), output.any { it.contains("balance broken") })
} finally {
root.deleteRecursively()
}
}
private fun testGitBinary(): File {
System.getenv("GITHUG_TEST_GIT_BINARY")
?.takeIf { it.isNotBlank() }