Misc Changes

This commit is contained in:
Joe Tretter
2026-05-09 22:49:15 -05:00
parent f49e8a96b1
commit 8f829fb969
13 changed files with 139 additions and 583 deletions

View File

@@ -14,6 +14,13 @@ class EditorCommandsTest {
assertEquals("vi .gitignore", invocation?.command)
}
@Test
fun parsesAdditionalEditorAliases() {
assertEquals("vim", parseVisualEditorInvocation("vim .gitignore")?.editor)
assertEquals("edit", parseVisualEditorInvocation("edit README")?.editor)
assertEquals("notepad", parseVisualEditorInvocation("notepad notes.txt")?.editor)
}
@Test
fun ignoresEditorOptionsWhenChoosingPath() {
val invocation = parseVisualEditorInvocation("nano -w README")

View File

@@ -277,13 +277,14 @@ class GitSandboxEngineTest {
}
@Test
fun interactiveStageDoesNotThrow() {
fun interactiveStageUsesConsoleText() {
val repo = RepoState(initialized = true, files = listOf(GitFile("README")))
val (updatedRepo, output) = GitSandboxEngine.execute(repo, "git stage -i")
assertTrue(updatedRepo.files.single { it.name == "README" }.staged)
assertTrue(output.any { it.contains("Interactive add is handled by GitHug Android") })
assertTrue(output.any { it.contains("What now>") })
assertFalse(output.any { it.contains("GitHug Android") })
}
private fun testGitBinary(): File {