Skip to content

Add opt-in binary string diff support#301

Open
gschlager wants to merge 2 commits intosplitwise:mainfrom
gschlager:binary-diff
Open

Add opt-in binary string diff support#301
gschlager wants to merge 2 commits intosplitwise:mainfrom
gschlager:binary-diff

Conversation

@gschlager
Copy link

Depends on #300

Add a SuperDiff::BinaryString extension that renders ASCII-8BIT strings as hex dumps. Users opt-in by requiring the module:

require 'super_diff/binary_string'

Includes a dedicated differ, inspection tree builder, operation tree builder/tree/flattener, and updates SuperDiff::RSpec::Differ to allow diffs for binary strings (skipping the single-line string short-
circuit).

Hex dumps use 16 bytes per line with offset, hex pairs, and ASCII representation (xxd-style output).

Add a `SuperDiff::BinaryString` extension that renders `ASCII-8BIT` strings as hex dumps. Users opt-in by requiring the module:

```
require 'super_diff/binary_string'
```

Includes a dedicated differ, inspection tree builder, operation tree builder/tree/flattener, and updates SuperDiff::RSpec::Differ to allow diffs for binary strings (skipping the single-line string short-
circuit).

Hex dumps use 16 bytes per line with offset, hex pairs, and ASCII representation (xxd-style output).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant