MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestPromptGrowsOnWrappedLongLine

Function TestPromptGrowsOnWrappedLongLine

internal/tui/tui_test.go:2374–2383  ·  view source on GitHub ↗

TestPromptGrowsOnWrappedLongLine: a long paragraph typed without Enter has LineCount()==1, so relying on it sticks the textarea at 1 row while text wraps off-screen. recomputeLayout must count *visual* rows.

(t *testing.T)

Source from the content-addressed store, hash-verified

2372 out, _ := m.runSlash("/clear")
2373 if got := out.(Model).sessionTokens; got != 0 {
2374 t.Fatalf("/clear should reset sessionTokens to 0, got %d", got)
2375 }
2376}
2377
2378// TestWrapRowsMatchesBubblesBehaviour: wrapRows must match the row count of
2379// bubbles/textarea's internal wrap(): word-boundary aware, hard-wrap fallback
2380// for over-wide single words, and a trailing cursor-anchor row when content
2381// exactly fills the width.
2382func TestWrapRowsMatchesBubblesBehaviour(t *testing.T) {
2383 cases := []struct {
2384 name string
2385 input string
2386 width int

Callers

nothing calls this directly

Calls 4

newTestModelFunction · 0.85
SetValueMethod · 0.80
recomputeLayoutMethod · 0.80
HeightMethod · 0.80

Tested by

no test coverage detected