moo.shell.tests.test_window

Tests for the windowed-display mode:

  • WindowState grid/scroll model (write/overwrite, cursor+emit, clear, resize, scroll tail).

  • build_window_app construction smoke test.

  • MooPrompt.run_window_session callback dispatch + lifecycle flag.

  • MooPrompt._route_window_event mutations + raw-mode no-op.

  • editor/paginator rejection while a window is active.

  • MooPrompt._window_append output reroute.

Functions

test_build_window_app_constructs()

test_route_event_rejects_editor_in_window_mode()

test_route_window_event_close_exits_app()

test_route_window_event_noop_in_raw_mode()

test_route_window_event_open_queues_when_inactive()

test_route_window_event_split_resizes()

test_route_window_event_write_mutates_and_invalidates()

test_run_window_session_close_does_not_disconnect()

c-q / c-c (window_eof clear) just closes the window — the session stays up.

test_run_window_session_dispatches_callback_and_clears_state()

test_run_window_session_eof_signals_disconnect()

^D in window mode (window_eof set) quits the session: run_window_session sets is_exiting and the disconnect_event so the main loop breaks.

test_run_window_session_no_callback_without_fields()

test_run_window_session_rejects_non_wizard_caller()

test_window_append_routes_output_to_scroll()

test_windowstate_append_splits_lines()

test_windowstate_clear_row_then_all()

test_windowstate_cursor_emit_advances()

test_windowstate_emit_wraps_on_newline()

test_windowstate_scroll_returns_tail()

test_windowstate_set_height_resizes_render()

test_windowstate_write_overwrites_same_cell()

test_windowstate_write_positions_by_column()