Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296357

Line ending normalizing is broken on WAMP

$
0
0

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


Viewing all articles
Browse latest Browse all 296357

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>