Validate shell completion across supported shells

This commit is contained in:
2026-11-03 04:16:39 +00:00
parent 96250d1887
commit 0450ecfc16
6 changed files with 207 additions and 29 deletions

View File

@@ -39,7 +39,17 @@ try:
child.expect_exact("PROMPT> ")
child.send(line)
child.send("\t")
child.sendline("")
child.expect_exact("PROMPT> ")
if os.environ.get("PROBE_LIST") == "1":
child.send("\t")
remaining = ["Readable text", "YAML output"]
captured = []
while remaining:
index = child.expect_exact(remaining)
captured.append(child.before + child.after)
remaining.pop(index)
print("".join(captured))
else:
child.sendline("")
child.expect_exact("PROMPT> ")
finally:
child.close(force=True)