Line ending normalizing is broken on WAMP

Created on 10 August 2015, over 9 years ago
Updated 11 January 2024, 11 months ago

Problem description:

On WAMP machines, the TestDiscovery does not correctly parse the line endings. The result is a bunch of /n's in a long string of the test class description. I attached a screenshot , it's huge so I won't embed it here.

Proposed solution:

Fix the normalization of line endings to work on windows.
Now:

 // Normalize line endings.
    $doc_comment = preg_replace('/\r\n|\r/', '\n', $doc_comment);

My patch:

    // Normalize line endings.
    $doc_comment = str_replace('\r\n', '\n', $doc_comment);
    $doc_comment = str_replace('\r', '\n', $doc_comment);

And a screenshot of the fixed version is attached and linked .

UI Changes:

On windows, the Test discovery works again! See the screenshot above.

The rest:

None

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Base 

Last updated about 1 hour ago

Created by

🇨🇭Switzerland LKS90

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024