* Adding a noxml option for skipping XML well formdness tests in parser tests,
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 8 Jan 2006 10:37:25 +0000 (10:37 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 8 Jan 2006 10:37:25 +0000 (10:37 +0000)
  used in the extension tag tests which don't return xhtml

maintenance/parserTests.inc

index c58c8aa..2abe8ae 100644 (file)
@@ -237,6 +237,8 @@ class ParserTest {
                        $titleText = 'Parser test';
                }
 
+               $noxml = (bool)preg_match( '~\\b noxml \\b~x', $opts );
+
                $parser =& new Parser();
                wfRunHooks( 'ParserTestParser', array( &$parser ) );
                $title =& Title::makeTitle( NS_MAIN, $titleText );
@@ -260,7 +262,7 @@ class ParserTest {
 
                $this->teardownGlobals();
 
-               if( $result === $out && $this->wellFormed( $out ) ) {
+               if( $result === $out && ( $noxml === true || $this->wellFormed( $out ) ) ) {
                        return $this->showSuccess( $desc );
                } else {
                        return $this->showFailure( $desc, $result, $out );