Fixed a couple sneaky bugs with prompts.
This commit is contained in:
1 parent
c842a1e3db
commit
21cecd1e71
3 files changed
+55
-6
No files matched your search
+11
-4
@@ -21,6 +21,9 @@ def fixture_shell():
|
||||
data = os.read(0, 4096)
|
||||
if not data:
|
||||
return
|
||||
if data == b"\x04":
|
||||
os.write(1, b"\x1b[24;1H\x1b[2K[Username@host directory] $ ")
|
||||
continue
|
||||
os.write(1, data)
|
||||
|
||||
|
||||
@@ -128,13 +131,17 @@ def main():
|
||||
bridge.write_status(statusPath, "done")
|
||||
time.sleep(0.4)
|
||||
action("Insert+0", "Codex finished")
|
||||
action("Insert+a", "Application Codex")
|
||||
action("d", "Default")
|
||||
action("Return", "Default settings restored")
|
||||
# Leave old Codex/composer text visible and keep the bridge alive:
|
||||
# the fresh shell prompt itself must restore ordinary behavior.
|
||||
action("ctrl+d", "Default settings restored")
|
||||
keyboard.key("h", "e", "l", "l", "o")
|
||||
action("Left", "o")
|
||||
action("Left", "l")
|
||||
action("Right", "o")
|
||||
keyboard.key("Insert+q")
|
||||
wait_for(lambda: (root / "finished").exists(), "reader exit")
|
||||
assert not server.errors, server.errors
|
||||
print("PASS: real private PTY/override/socket bridge, composer Left/Right feedback, baseline history, completed messages only, one announcement, long replies, replay and status")
|
||||
print("PASS: real private PTY/override/socket bridge, composer Left/Right feedback, baseline history, completed messages only, one announcement, long replies, replay, status, shell exit without bridge closure and restored shell arrows")
|
||||
except BaseException:
|
||||
print("Recent private speech:", server.events[-15:], file=sys.stderr)
|
||||
if (root / "status.json").exists():
|
||||
|
||||
Reference in new issue
Block a user