bandit icon indicating copy to clipboard operation
bandit copied to clipboard

Improve string diff visualization

Open MartinDelille opened this issue 5 years ago • 2 comments

Visualising difference on big string is tricky.

I found this library: https://github.com/cubicdaiya/dtl

Do you think we could use it to improve string diff visualisation?

MartinDelille avatar Mar 28 '20 06:03 MartinDelille

I think any attempts to visualize difference in the actual and expected strings in bandit (or snowhouse) would be feature creep.

sbeyer avatar Mar 28 '20 17:03 sbeyer

I am currently using GTest at work and I noticed that GTest provides diff output. I never found it really useful but I can imagine that it may make sense for big strings (like file content).

I could imagine for snowhouse that it can be possible to register callbacks to assertions, and these callbacks are called when the assertion fails. This would allow the user to register a string diff routine (which could be mentioned as concrete example in the documentation, maybe using dti).

sbeyer avatar Apr 16 '21 01:04 sbeyer