Align tests with runtime sandbox and polish terminal help
- Run level solution scenarios through GitRepositoryRuntime with a real filesystem sandbox and git binary so evidence logs match app behavior. - Materialize synthetic remotes as local bare repositories and configure upstream tracking for pull/push levels. - Route mobile-hostile Git interactions through shared sandbox semantics for clone, patch add, interactive rebase, squash merge, submodule, stash, revert, and related flows. - Relax affected level validators to inspect observable runtime state instead of fallback-only staged/index details. - Show .git in ls output for native and fallback helper commands. - Make tab completion resolve filenames and directories relative to the current working directory. - Integrate help controls into the callout overlay and reposition the prompt callout above the terminal prompt. - Add regression coverage for .git listing and subfolder completion.
This commit is contained in:
@@ -122,6 +122,31 @@ class GitSandboxEngineTest {
|
||||
assertTrue(".gitignore" in output)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun lsShowsGitDirectoryEntry() {
|
||||
val repo = RepoState(initialized = true)
|
||||
|
||||
val (_, output) = GitSandboxEngine.execute(repo, "ls")
|
||||
|
||||
assertTrue(".git" in output)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun fileCompletionUsesCurrentDirectory() {
|
||||
val repo = RepoState(
|
||||
initialized = true,
|
||||
currentDir = "src",
|
||||
files = listOf(
|
||||
GitFile("README"),
|
||||
GitFile("src/main.kt"),
|
||||
GitFile("src/model/User.kt"),
|
||||
),
|
||||
)
|
||||
|
||||
assertEquals(listOf("main.kt", "model/User.kt"), fileCompletionCandidates(repo).sorted())
|
||||
assertEquals(listOf("model/"), directoryCompletionCandidates(repo))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun cdDotDotShortcutMovesToParentDirectory() {
|
||||
val repo = RepoState(initialized = true, currentDir = "src/main")
|
||||
|
||||
Reference in New Issue
Block a user