Repository navigation
Commit 55922d9
committed
test(usage): pin the preview truncation boundary exactly
The bounded-payload case asserted only that the preview was a string of at
most 65 characters, so an empty preview, a 63-character preview, and a
64-character preview with a spurious ellipsis all passed. The truncation
boundary is now pinned at both sides: a 64-character counter is kept whole
and a 65-character counter keeps its first 64 characters plus an ellipsis.
Both cases fail on the previous head when the cap is off by one, and the
64-character case fails when the comparison is tightened to >=.1 parent d9b68e7 commit 55922d9
1 file changed
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
| 311 | + | |
313 | 312 | | |
314 | 313 | | |
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
318 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
319 | 342 | | |
320 | 343 | | |
321 | 344 | | |
| |||
0 commit comments