Dippy icon indicating copy to clipboard operation
Dippy copied to clipboard

tests: cover MCP wrapping, pin single-line test to a fits-width case

Open ldayton opened this issue 5 months ago • 0 comments

Follow-up to #156. The width-aware MCP layout introduced multi-line output, which left test_output_is_single_line's "no embedded newlines" invariant only conditionally true — it kept passing solely because CI has no ~/.claude/mcp.local.json and no COLUMNS, so no MCP segment is rendered to wrap.

  • Pin test_output_is_single_line to a wide COLUMNS so it deterministically asserts the fits-on-one-line path regardless of the runner's MCP config.
  • Add TestMcpWrapping: seeds a temp HOME with a 12-server mcp.local.json and asserts the output wraps onto continuation lines at a narrow width (COLUMNS=40) and stays single-line at a wide one (COLUMNS=1000).
  • run_statusline gains an env overlay so tests can drive COLUMNS/HOME.

ldayton avatar Jun 12 '26 10:06 ldayton