Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.5.8, 3.6.6, 3.7, 3.8, 3.9
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
Description
First of all, this is not critical at all and, in fact, it has been working ok till now.
But, recently, I started to play with travis to get unit tests running there for Windows and this issue is 100% breaking the execution.
Link to code: https://github.com/moodle/moodle/blob/master/lib/tests/messageinbound_test.php#L112-L115
Basically, we are loading a file, that can have \n or \r\n, depending of the git checkout options... and we correctly normalize the file always, replacing all CRLFs by LFs.
But, then, instead of using that normalized $content, we load the file again, ultimately heading to a complete phpunit error, because it's in a provider executed early in the phpunit process.
So this is about to ensure that we use the normalized $content and done. With that, those windows executions having git configured to get CRLFs... will continue working ok. I quick tried here and passed from:
- Failing, current code: https://travis-ci.org/stronk7/moodle/builds/608356975 (Coding error detected, it must be fixed by a programmer: The test file...)
To:
- Running, with the simple "kk" patch: https://travis-ci.org/stronk7/moodle/builds/608480118 (note there are other problems but that's apart, the point is that the phunit execution continues)
Attachments
Issue Links
- is a regression caused by
-
MDL-50153 Error executing windows unit tests
-
- Closed
-