moo.shell.tests.test_prompt_raw_reader
Tests for MooPrompt._read_line_raw — the raw-mode line reader.
The real implementation reads keys from prompt_toolkit’s Input abstraction
wired up by the contrib SSH session. Here we stub that abstraction: a fake
Input returns scripted KeyPress sequences, and we assert the reader buffers,
echoes, and terminates as expected.
Functions
Server-side echo would land as a duplicate copy in MUD clients that local-echo (Mudlet, MUSHclient, TinTin++). |
|
Characters delivered across multiple read_keys() calls still produce one line. |
|
A sequence of character keys followed by Enter yields the decoded line without CR/LF. |
|
Ctrl-D on an empty buffer signals EOF and returns None. |