TestSmallPasteStaysInline: a paste below threshold stays raw, no chip.
(t *testing.T)
| 54 | |
| 55 | // TestSmallPasteStaysInline: a paste below threshold stays raw, no chip. |
| 56 | func TestSmallPasteStaysInline(t *testing.T) { |
| 57 | p := newChippablePrompt() |
| 58 | small := makePaste(3) |
| 59 | p, _ = p.Update(pasteKey(small)) |
| 60 | |
| 61 | if len(p.spans) != 0 { |
| 62 | t.Fatalf("small paste must not create chip, got spans=%+v", p.spans) |
| 63 | } |
| 64 | if got := p.DisplayValue(); got != small { |
| 65 | t.Fatalf("display value should equal raw paste, got %q", got) |
| 66 | } |
| 67 | if got := p.Value(); got != small { |
| 68 | t.Fatalf("expanded value should equal raw paste, got %q", got) |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // TestLargePasteBecomesChip: a ≥pasteChipMinLines paste collapses to one chip. |
| 73 | // DisplayValue shows the label, Value expands back to the original. |
nothing calls this directly
no test coverage detected