Properly handle newlines in diagnostic error tests
Properly handle newlines in diagnostic error tests

This is necessary to ensure that the output can be compared directly.

pfmoore/pip,pradyunsg/pip,pypa/pip,pradyunsg/pip,pypa/pip,sbidoul/pip,pfmoore/pip,sbidoul/pip