thomhurst / TUnit

A modern, fast and flexible .NET testing framework
MIT License
2.32k stars 37 forks source link

Support displaying correct difference for multi-line strings #842

Closed vbreuss closed 1 month ago

vbreuss commented 1 month ago

Currently two methods highlight the difference between two strings:

There is a bug, that the index of first difference for multiline-strings is incorrectly set to 0, when the first difference is on the first character of a new line, e.g.

foo
bar

and

foo
something-other

Also moved the calculation and display of such a difference to a common helper class.