FAILURE MAP
← Case archive

FA-95994 / Postal address normalization / Member archive

Address label line wrapper: the joining space is not counted · case 04

A line one character longer than the label width is produced.

Member previewVariant 4 · 3 implementations · 6 checks per implementation

Case contract

Input [text, width, max_lines]. Words are whitespace-separated. A word longer than width first flushes the current line, then is emitted in width-sized chunks, the final remainder continuing as an ordinary word. Words join with single spaces while the line length stays <= width. Return {"lines": the first max_lines lines, "overflow": whether more than max_lines lines were needed}.

Why this case matters

Label printers and carrier manifests cap line length and line count; an off-by-one silently truncates part of the address.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
one character over once the separator counts{"lines": ["ATTN ZORBLETONV"], "overflow": false}{"lines": ["ATTN", "ZORBLETONV"], "overflow": false}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗