-
Task
-
Resolution: Fixed
-
Minor
-
4.4, 4.5
-
MOODLE_404_STABLE, MOODLE_405_STABLE
-
MOODLE_404_STABLE
-
MDL-81581_404 -
This is a regression introduced by MDL-80416 and causing one consistent unit test failure under windows:
3) qtype_ordering\questiontype_test::test_gift_export
|
Failed asserting that two strings are equal.
|
--- Expected
|
+++ Actual
|
@@ @@
|
'// question: 123 name: Moodle\n
|
// [id:myid]\n
|
-::Moodle::[html]Put these words in order.{>2 none\n
|
-Modular\n
|
-Object\n
|
-Oriented\n
|
-Dynamic\n
|
-Learning\n
|
-Environment\n
|
+::Moodle::[html]Put these words in order.{>2 none\r\n
|
+Modular\r\n
|
+Object\r\n
|
+Oriented\r\n
|
+Dynamic\r\n
|
+Learning\r\n
|
+Environment\r\n
|
}\n
|
'
|
|
C:\Users\stronk7\git_moodle\integration\question\type\ordering\tests\questiontype_test.php:329
|
C:\Users\stronk7\git_moodle\integration\lib\phpunit\classes\advanced_testcase.php:72
|
From the previous discussion in the original issue, this should be the plan to fix the EOL problems (quoting Tim):
If you look at the tests of Moodle XML import/export, then they use a method assert_same_xml which compares two strings while ignoring line endings.
We could do something similar here. (But, don't use a method called assert_same_xml to compare GIFT format. That is confusing. Make a new assert_same_text_ingoring_line_endings - and use that in your test, and refactor assert_same_xml to use it.