Skip to main content

Module steps

Module steps 

Source
Expand description

Seven built-in steps with corpus parity, ported to the InMemorySession-style Session trait.

Each step mirrors termproof/builtin_steps.py exactly:

  • wait_for_text — search screen then raw_output independently via Session::wait_for_text (Result<bool, SessionError>).
  • wait_for_idle — stable-screen detection via Session::wait_for_idle.
  • send_text / send_line — feed child stdin (send_line appends \r).
  • press — named-key / Ctrl- mapping delegated to Session::press.
  • sleep — wall-clock sleep + read_available(0) drain.
  • wait_for_regex — regex validation, timeout validation (NaN/Inf/<=0, non-numeric), independent screen/raw search without synthetic \n boundary, and evidence detail that matches builtin_steps.py::_format_match byte-for-byte (named groups, positional groups, full match).

Functions§

dispatch
Dispatch a single step by its action field.
press
press — send a named key or Ctrl- combo.
run_steps
Run a sequence of steps, stopping on first failure (matches Python’s VerificationRunner._run_pty/_run_process if not passed: break).
send_line
send_line — feed text + "\r" (default text is "" as in Python).
send_text
send_text — feed text verbatim (no newline).
sleep
sleep — wall-clock sleep then read_available(0) drain.
wait_for_idle
wait_for_idle — screen has been stable for stable_seconds.
wait_for_regex
wait_for_regex — regex validation, timeout validation, streaming poll.
wait_for_text
wait_for_text — poll screen and raw_output for text.