Specifically this line from the called PHPUnit_Util_Type::recursiveExport replaces any string concatenated with PHP_EOL in Windows with an extra newline, mangling the result somewhat:
str_replace(array("\n\r", "\r"), array("\n", "\n"), $value)
And the fix would be
str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value)
? Or what are you getting at? Just making sure I understand the problem?
I'd also take a reproduce case if you want :)
Yes, that works fine, thanks. I don't know the code well enough to understand why the substitution needs to be made, or indeed what "\n\r" is, but I'm guessing there's a good reason. :)
Just to add: I'm seeing the problem currently when capturing output that includes PHP_EOLs , and an assertRegExp fails - whole output is echoed with the extra lines. Not a big deal, really, but could be confusing for some as the input string doesn't match the error output.
Fixes #581: Windows diffs where polluted with extra newlines