Add --quick option to suppress display of diffs.
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 23 Sep 2004 05:45:17 +0000 (05:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 23 Sep 2004 05:45:17 +0000 (05:45 +0000)
maintenance/parserTests.php

index 012bfea..20d666c 100644 (file)
@@ -43,6 +43,12 @@ class ParserTest {
                } else {
                        $this->color = true;
                }
+               
+               if( isset( $_SERVER['argv'] ) && in_array( '--quick', $_SERVER['argv'] ) ) {
+                       $this->showDiffs = false;
+               } else {
+                       $this->showDiffs = true;
+               }
        }
        
        function runTestsFromFile( $filename ) {
@@ -172,9 +178,9 @@ class ParserTest {
        
        function showFailure( $desc, $result, $html ) {
                print $this->termColor( '1;31' ) . 'FAILED!' . $this->termReset() . "\n";
-               #print "!! Expected:\n$result\n";
-               #print "!! Received:\n$html\n!!\n";
-               print $this->quickDiff( $result, $html );
+               if( $this->showDiffs ) {
+                       print $this->quickDiff( $result, $html );
+               }
                return false;
        }