Author: ts
Date: Mon Sep 24 23:31:10 2007
New Revision: 6251
Log:
- Added --no-color option to disable formats for logging.
Modified:
trunk/Webdav/tests/visualize_results.php
Modified: trunk/Webdav/tests/visualize_results.php
==============================================================================
--- trunk/Webdav/tests/visualize_results.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/visualize_results.php [iso-8859-1] Mon Sep 24 23:31:10
2007
@@ -116,6 +116,12 @@
$testOpt->shorthelp = 'Path pattern defining the test cases to display data
for.';
$testOpt->longhelp = 'This option may contain a path pattern as understood by
glob(), defining the test cases to display data for. An example would be
"get_*" to only see all test cases that start with "get_".';
+$noColorOpt = $in->registerOption(
+ new ezcConsoleOption( 'n', 'no-color' )
+);
+$noColorOpt->shorthelp = 'Switch of use of format codes (for logging).';
+$noColorOpt->longhelp = 'Switches of the use of shell formatting codes, like
color and style. This is particularly useful if you want to log the generated
output.';
+
try
{
$in->process();
@@ -136,6 +142,11 @@
$in->getHelpText( 'Webdav client test viewer', 80, true )
);
exit(0);
+}
+
+if ( $noColorOpt->value === true )
+{
+ $out->options->useFormats = false;
}
$suites = glob( dirname( __FILE__ ) . "/clients/{$suiteOpt->value}",
GLOB_ONLYDIR );
@@ -164,7 +175,6 @@
$out->outputLine( '-------------------------------------- END
-------------------------------------', 'border' );
}
- $out->outputLine( '--- Printing infos for test "' . basename( $test )
. '/response":', 'headline_2' );
$responseInfos = loadFiles( glob( "{$test}/response/*" ) );
if ( count( $responseInfos ) === 0 )
@@ -173,6 +183,7 @@
}
foreach ( $responseInfos as $file => $info )
{
+ $out->outputLine( '--- Printing infos for test "' . basename(
$test ) . '/response":', 'headline_2' );
$out->outputLine( '----- Printing file contents for "' . $file .
'"', 'headline_3' );
$out->outputLine( '------------------------------------- START
------------------------------------', 'border' );
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components