summaryrefslogtreecommitdiff
path: root/test/agent_session_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/agent_session_test.py')
-rw-r--r--test/agent_session_test.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/agent_session_test.py b/test/agent_session_test.py
index ba20b5a9..6dc385ab 100644
--- a/test/agent_session_test.py
+++ b/test/agent_session_test.py
@@ -71,6 +71,12 @@ def check(binary, options, command, expected, phase=None, cleanup_failure=False)
assert time.monotonic() - started < 8, 'timeout did not bound cleanup'
+# What pardes does for the driver (a prompt that settles, history past a
+# screenful, a raw-mode key, a probe and ^U) is test/process/terminals.zig;
+# what is left here is the driver's own: its arguments, its JSON, its
+# timeouts and its cleanup.
+
+
def main():
parser = argparse.ArgumentParser()
parser.add_argument('binary', type=Path)
@@ -93,16 +99,11 @@ def main():
]:
check(binary, options, argv, 2)
check(binary, ready + ['--timeout', '10'], command, 0)
- check(binary, ready + ['--timeout', '10', '--min-rows', '1000'],
- ['/bin/sh', '-c', 'printf "AGENT_READY> "; sleep .3; seq 1 3000; printf "AGENT_READY> "; read answer'], 0)
- check(binary, ready + ['--timeout', '10', '--min-rows', '1000', '--prepare-key', '0f'],
- ['/bin/sh', '-c', 'stty raw -echo; printf "AGENT_READY> "; dd bs=1 count=1 of=/dev/null 2>/dev/null; '
- 'stty sane; seq 1 3000; printf "AGENT_READY> "; read answer'], 0)
check(binary, ready + ['--timeout', '2', '--min-rows', '1000'], command, 1, 'history')
check(binary, ready + ['--timeout', '1'],
['/bin/sh', '-c', ': AGENT_READY; sleep 30'], 1, 'readiness')
check(binary, ready + ['--timeout', '10'], command, 1, 'files-cleanup', cleanup_failure=True)
- print('agent-session: 16 functional argument, interaction, timeout and cleanup checks passed')
+ print('agent-session: 14 argument, output, timeout and cleanup checks of the driver passed')
if __name__ == '__main__':