Skip to content

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

Open
ldayton wants to merge 1 commit into
mainfrom
lily/statusline-wrap-tests
Open

tests: cover MCP wrapping, pin single-line test to a fits-width case#157
ldayton wants to merge 1 commit into
mainfrom
lily/statusline-wrap-tests

Conversation

@ldayton

@ldayton ldayton commented Jun 12, 2026

Copy link
Copy Markdown
Owner

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.

The width-aware MCP layout made test_output_is_single_line's no-newline invariant conditional, but it kept passing only because CI has no mcp.local.json and no COLUMNS. Pin it to a wide COLUMNS so it deterministically asserts the fits-on-one-line path, and add TestMcpWrapping which seeds a temp HOME with a long MCP server list and asserts the output wraps at a narrow width and stays single-line at a wide one. run_statusline gains an env overlay to drive COLUMNS/HOME.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant