TestVisualPromptLinesSumsAcrossLogicalLines: visualPromptLines splits on newlines and sums wrapRows for each segment: the prompt field grows to hold the combined visual height.
(t *testing.T)
| 2355 | func TestWrapRowsMatchesBubblesBehaviour(t *testing.T) { |
| 2356 | cases := []struct { |
| 2357 | name string |
| 2358 | input string |
| 2359 | width int |
| 2360 | wantRows int |
| 2361 | }{ |
| 2362 | {"empty", "", 15, 1}, |
| 2363 | {"short fits", "hello", 15, 1}, |
| 2364 | {"short with spaces fits", "hi you", 15, 1}, |
| 2365 | {"exactly fills width adds cursor anchor", strings.Repeat("x", 15), 15, 2}, |
| 2366 | {"just under width", strings.Repeat("x", 14), 15, 1}, |
| 2367 | {"just over width hard-wraps", strings.Repeat("x", 16), 15, 2}, |
| 2368 | {"long hard-wrap no spaces", strings.Repeat("x", 45), 15, 4}, |
| 2369 | {"word-boundary wastes space", strings.Repeat("hello ", 20), 15, 10}, |
| 2370 | {"zero width floors to 1", "anything", 0, 1}, |
| 2371 | } |
| 2372 | for _, c := range cases { |
nothing calls this directly
no test coverage detected