Make bisect playable and validate commit_in_future using Git author timestamps
This commit is contained in:
@@ -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() }
|
||||
|
||||
Reference in New Issue
Block a user