FAILURE MAP
← Case archive

FA-75557 / Text diff and three-way merge / Member archive

Whitespace comparison modes: whitespace-only lines count as blank in every mode · case 02

Without a whitespace option, adding a line of spaces is ignored as a blank line.

Member previewVariant 2 · 3 implementations · 10 checks per implementation

Case contract

Normalize each line: with strip_cr remove one trailing "\r"; mode "w" deletes all whitespace (str.split semantics); mode "b" collapses runs of spaces and tabs to one space and strips trailing spaces and tabs; mode "none" leaves the line. With ignore_blank, drop lines whose normalized key is empty. Return both key lists and whether they are equal.

Why this case matters

Diff options like -w, -b, --strip-trailing-cr and --ignore-blank-lines decide which changes are shown at all.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
whitespace-only line is blank only when normalized empty{"a": ["x", "y"], "b": ["x", "y"], "equal": true}{"a": ["x", " ", "y"], "b": ["x", "y"], "equal": 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 ↗