You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Slack @borkdude raised the idea of a matcher that would show differences from a blob of text by line.
Given expectation of a blob of text
a
b
c
d
e
And actual blob of text
a
x
c
e
line x would show as different from line b and line d would show as missing.
Related
To be extra useful, this matcher assumes the comparison behaviour described in #177.
Alternatives
Something I sometimes do when using kaocha is to preprocess text blobs into a vector of line strings and then compare. Because kaocha uses deep-diff2 which implements #177, the diffs can be pretty nice.
Fleshing it out
what text sources should this support? Strings for sure. Files would be nice. URLs? Streams?
should we somehow show character differences within a line? Perhaps an idea for some later iteration.
what would be a good name for the matcher? by-line sounds like a good name to me.
would this matcher be invoked automatically? probably not, would probably want to explicitly specify this matcher, am I right?
what about OS newline differences? Maybe ignore them? Thoughts?
other?
The text was updated successfully, but these errors were encountered:
The Idea
On Slack @borkdude raised the idea of a matcher that would show differences from a blob of text by line.
Given expectation of a blob of text
And actual blob of text
line
x
would show as different from lineb
and lined
would show as missing.Related
To be extra useful, this matcher assumes the comparison behaviour described in #177.
Alternatives
Something I sometimes do when using kaocha is to preprocess text blobs into a vector of line strings and then compare. Because kaocha uses deep-diff2 which implements #177, the diffs can be pretty nice.
Fleshing it out
by-line
sounds like a good name to me.The text was updated successfully, but these errors were encountered: