. String does not match at position 0. Expected char: 'e', but got 'a'.
---------- Actual: --------------------
expected text
---------- Expected: ------------------
actual text
The Expected char: 'e', but got 'a'. is correct, but the part after is mixed up. I would expect this:
. String does not match at position 0. Expected char: 'e', but got 'a'.
---------- Actual: --------------------
actual text
---------- Expected: ------------------
expected text
Screen shot:
Also note how the blue color leaks into the -- Actual: -- line. It’s even more apparent if both actual and expected start with some common text – notice how the first “some” is blue, while it should be white:
It’s worse if you use Expecto.Diff.equals in Xunit using dotnet test:
Notice how the red color leaks into the diff and colors the first “some” red.
Repro repo: https://github.com/lydell/ExpectoDiffMixup
I’ve enabled
Expecto.Diff
:Running this assertion:
… results in this message:
The
Expected char: 'e', but got 'a'.
is correct, but the part after is mixed up. I would expect this:Screen shot:
Also note how the blue color leaks into the
-- Actual: --
line. It’s even more apparent if bothactual
andexpected
start with some common text – notice how the first “some” is blue, while it should be white:It’s worse if you use
Expecto.Diff.equals
inXunit
usingdotnet test
:Notice how the red color leaks into the diff and colors the first “some” red.
Pinging @drhumlen in case you’re interested 🙂