skip math-related tests if $wgUseTeX is set to false in LocalSettings: this probably...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 31 Aug 2009 14:29:11 +0000 (14:29 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 31 Aug 2009 14:29:11 +0000 (14:29 +0000)
maintenance/parserTests.inc

index 8525594..6a5ffdd 100644 (file)
@@ -367,6 +367,12 @@ class ParserTest {
                                                $section = null;
                                                continue;
                                        }
+                                       if ( preg_match('/\\bmath\\b/i', $data['options']) && !$this->savedGlobals['wgUseTeX'] ) {
+                                               # don't run math tests if $wgUseTeX is set to false in LocalSettings
+                                               $data = array();
+                                               $section = null;
+                                               continue;
+                                       }
                                        $result = $this->runTest(
                                                $this->chomp( $data['test'] ),
                                                $this->chomp( $data['input'] ),