FA-75555 / Text diff and three-way merge / Member archive
Whitespace comparison modes: every trailing carriage return is stripped · case 05
Lines ending in two carriage returns compare equal to lines with one.
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 |
|---|---|---|---|
| carriage return stripped once | {"a": ["line", "two"], "b": ["line", "two"], "equal": true} | {"a": ["line", "two\r"], "b": ["line", "two"], "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 ↗