933a3b65

Created Started Finished

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Golden the colour along with the words

Every golden of something a person reads was of the plain rendering, and the
colour was covered by two assertions that it existed: renderReportColoured
puts an escape sequence somewhere, and safe-coloured-text drops its colour
when the terminal has none. Neither says which words are picked out. Making
the marker green rather than red, or dropping the styling from the rule text
under it, passed the whole suite.

So the goldens are now of the coloured rendering: the rule goldens, the report
goldens, the dirty example, the two annotation reports, and the two explain
goldens. What a reader of these has to do is read them with something that
interprets the escapes, which is what `cat` does and what a diff viewer will
not.

The plain rendering keeps the one assertion it needs, and it changes direction
with the goldens: ReportSpec used to say the coloured path exists at all, and
now says the plain path stays plain, which is the half that nothing else would
catch once every golden holds escape sequences.

Two comments said the opposite of this on purpose and are rewritten rather
than deleted, since the reason they gave was true when they were written: a
golden full of escape sequences is harder to review, and that is the price
being paid for reviewing the colour at all.

Not goldened in colour: the JSON goldens, which have no colour, and the error
paths that render a rule-set error into an expectationFailure, which are
messages rather than output.