MDL-45221 Allow unit tests to pass under any OS
This commit gets rid of the old lib/tests/other/executable.php file completely because it was only executable under unix OSs and moves the check to be performed against some mimetex binaries that are known to be executable and bundled with every installation. Note this was discovered because the weekly rolling process changed the execution permissions of the "fixture" file and, at the end we decided to get rid of it completely, folowing the plan above.
This commit is contained in:
@@ -129,11 +129,16 @@ class core_admintree_testcase extends advanced_testcase {
|
||||
$this->assertRegexp('/class="patherror"/', $result);
|
||||
|
||||
// Check for a file which is not executable.
|
||||
$result = $executable->output_html($CFG->dirroot . '/config.php');
|
||||
$result = $executable->output_html($CFG->dirroot . '/filter/tex/readme_moodle.txt');
|
||||
$this->assertRegexp('/class="patherror"/', $result);
|
||||
|
||||
// Check for an executable file.
|
||||
$result = $executable->output_html($CFG->dirroot . '/lib/tests/other/executable.php');
|
||||
if ($CFG->ostype == 'WINDOWS') {
|
||||
$filetocheck = 'mimetex.exe';
|
||||
} else {
|
||||
$filetocheck = 'mimetex.darwin';
|
||||
}
|
||||
$result = $executable->output_html($CFG->dirroot . '/filter/tex/' . $filetocheck);
|
||||
$this->assertRegexp('/class="pathok"/', $result);
|
||||
|
||||
// Check for no file specified.
|
||||
|
||||
Reference in New Issue
Block a user