tests: cover MCP wrapping, pin single-line test to a fits-width case#157
Open
ldayton wants to merge 1 commit into
Open
tests: cover MCP wrapping, pin single-line test to a fits-width case#157ldayton wants to merge 1 commit into
ldayton wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsonand noCOLUMNS, so no MCP segment is rendered to wrap.test_output_is_single_lineto a wideCOLUMNSso it deterministically asserts the fits-on-one-line path regardless of the runner's MCP config.TestMcpWrapping: seeds a tempHOMEwith a 12-servermcp.local.jsonand asserts the output wraps onto continuation lines at a narrow width (COLUMNS=40) and stays single-line at a wide one (COLUMNS=1000).run_statuslinegains anenvoverlay so tests can driveCOLUMNS/HOME.