MDL-82745 filter_tex: Improve PHPUnit test

This commit is contained in:
Huong Nguyen
2024-08-08 21:01:46 +08:00
committed by Jun Pataleta
parent 587f65f34f
commit bef7f7e2f4
2 changed files with 1 additions and 1 deletions
-1
View File
@@ -102,7 +102,6 @@ function filter_tex_sanitize_formula(string $texexp): string {
// First, mangle all denied words.
$texexp = preg_replace_callback($denylist,
function($matches) {
error_log("FORBIDDEN: " . $matches[0]);
return 'forbiddenkeyword_' . $matches[0];
},
$texexp
+1
View File
@@ -49,6 +49,7 @@ class lib_test extends advanced_testcase {
['x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)', 'x\ =\ \frac{\sqrt{144}}{2}\ \times\ (y\ +\ 12)'],
['\usepackage[latin1]{inputenc}', '\usepackage[latin1]{inputenc}'],
['\newcommand{\A}{\verbatiminput}', '\newforbiddenkeyword_command{\A}{\verbatimforbiddenkeyword_input}'],
['\pdffiledump offset 0 length', 'forbiddenkeyword_\pdffiledump offset 0 length'],
];
}