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:
Eloy Lafuente (stronk7)
2014-04-29 19:22:54 +02:00
parent 65dcef2ae4
commit f500ff4e52
2 changed files with 7 additions and 2 deletions
+7 -2
View File
@@ -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.
View File