neotest-go icon indicating copy to clipboard operation
neotest-go copied to clipboard

feat: improve colored output

Open Davincible opened this issue 2 years ago • 4 comments

Continuation of #24

Davincible avatar Nov 04 '22 14:11 Davincible

image

I've added more coloring for testify output, the extra coloring is nice but I'm not sure about the colors themselves yet. Open to suggestions

Davincible avatar Nov 04 '22 15:11 Davincible

Panic highlight: image

Davincible avatar Nov 04 '22 22:11 Davincible

Changed to built-in functions. Didn't know about them

Davincible avatar Nov 07 '22 14:11 Davincible

There are two small bugs I'm not sure how to resolve;

  1. if a panic occurs and the goroutine number is 19, this artifact occurs
  2. sometimes patterns get overwritten by others, here the bytes after the file number are uncolored. This happens randomly. This is because color patterns in the table are unordered, which is fine, but even though all patterns should get applied to the same line, they somehow don't.

image

Edit: Nr. 1 happens because it does a 'replace all' on the number 19, which happens to be also contained in the color codes. Thus currently a pattern like <red>ABC</red> <green>ABC</green> wouldn't work because all occurrences would be colored green

Davincible avatar Nov 07 '22 14:11 Davincible