unit-threaded icon indicating copy to clipboard operation
unit-threaded copied to clipboard

Better support for multi-line Expected / Got

Open John-Colvin opened this issue 2 years ago • 2 comments

It can get pretty confusing to read the output when the expected & got values are multi-line. I'm not sure entirely what would be best to solve this, but maybe like this:

Expected:
          | a cup of
          | tea
Got:
          | a cup of brown liquid
          | almost but not entirely
          | unlike tea

or some other way of signalling "this bit is the values"

John-Colvin avatar Oct 03 '23 11:10 John-Colvin

The tricky bit here is figuring out what the algorithm should be, and I don't know myself.

atilaneves avatar Oct 04 '23 08:10 atilaneves

I was imagining "if found newline in message, split lines, prefix each line with |, join the pieces, add a \n to the front, there's your new message". I don't know if the outcome is the right one though.

John-Colvin avatar Oct 04 '23 09:10 John-Colvin