feat(scheduler-sim-repl-verbosity): task 6.1 - RED-phase REPL prompt tests
Adds 2 tests in a new test_repl_prompt_context.c covering the dynamic prompt's plain-before-first-session baseline and its session/timestamp content in both step and continue modes (Requirement 5.5). Required genuinely new test infrastructure: libedit's readline() only writes its prompt text when both stdin and stdout are real ptys, which no existing REPL test in this codebase's freopen()-from-file harness can observe. Built a PTY-based capture technique (openpty(), ECHO disabled via termios) instead - independently reproduced via a standalone probe and stress-tested 15x with zero flakiness during review. New file rather than extending test_repl_execution_control.c (already at 948 lines, over the 800-line cap), per this spec's established split precedent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAWMhfRJFnmmnG8h97yUDd
This commit is contained in:
parent
d9109b7c4b
commit
99fa45c41a
3 changed files with 705 additions and 1 deletions
|
|
@ -59,7 +59,7 @@
|
|||
- _Boundary: sim_print_decision gate_
|
||||
|
||||
- [ ] 6. (P) REPL prompt shows current session and timestamp
|
||||
- [ ] 6.1 (P) Write failing tests for the dynamic REPL prompt
|
||||
- [x] 6.1 (P) Write failing tests for the dynamic REPL prompt
|
||||
- Cover: the prompt is the plain `(sim) ` before any session has begun; once at least one session has run, the prompt includes the current session count and a human-readable timestamp; this holds in both `step` and `continue` modes; the prompt never alters any command's own output
|
||||
- Observable: the new test cases fail against today's static `XCE_REPL_PROMPT` macro, which never varies
|
||||
- _Requirements: 5.5_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue