FA-75548 / Text diff and three-way merge / Member archive
Whitespace comparison modes: -b collapses only spaces, not tabs · case 03
Replacing a tab with a space is reported as a change under -b.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| amount of whitespace ignored | {"a": ["a b", "c\t\td"], "b": ["a b", "c d"], "equal": false} | {"a": ["a b", "c d"], "b": ["a b", "c d"], "equal": true} | 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 ↗