logo       

4072 - trunk/Template/tests [eZComponents: Trunk]: msg#00241

web.ezcomponents.cvs

Subject: 4072 - trunk/Template/tests [eZComponents: Trunk]

Author: Jan Borsodi
Date: 2006-11-27 11:06:15 +0100 (Mon, 27 Nov 2006)
New Revision: 4072

Log:
- Added new interactive command "r" to retry to the current test in regression
test.

Modified:
trunk/Template/tests/regression_test.php

Modified: trunk/Template/tests/regression_test.php
===================================================================
--- trunk/Template/tests/regression_test.php 2006-11-27 10:06:15 UTC (rev
4071)
+++ trunk/Template/tests/regression_test.php 2006-11-27 10:06:15 UTC (rev
4072)
@@ -31,6 +31,8 @@

public $regressionDir = '';

+ private $retryTest = false;
+
private $stdin = null;

public function __construct()
@@ -89,16 +91,21 @@
{
$result->startTest($this);

- try {
- $this->testRunRegression( $directory );
- }
+ $this->retryTest = true;
+ while ( $this->retryTest )
+ {
+ try {
+ $this->retryTest = false;
+ $this->testRunRegression( $directory );
+ }

- catch (PHPUnit_Framework_AssertionFailedError $e) {
- $result->addFailure($this, $e, time() );
- }
+ catch (PHPUnit_Framework_AssertionFailedError $e) {
+ $result->addFailure($this, $e, time() );
+ }

- catch (Exception $e) {
- $result->addError($this, $e, time() );
+ catch (Exception $e) {
+ $result->addError($this, $e, time() );
+ }
}

$result->endTest($this, time());
@@ -157,7 +164,7 @@

while ( true )
{
- echo "Action (g/s/o/e/st/sp/tt/at/d/a/v/q/?): ";
+ echo "Action (g/s/r/o/e/st/sp/tt/at/d/a/v/q/?): ";

$reply = strtolower( trim( fgets( $this->stdin ) ) );

@@ -179,6 +186,11 @@

continue;
}
+ elseif ( $reply == "r" )
+ {
+ $this->retryTest = true;
+ return;
+ }
elseif ( $reply == "g" )
{
file_put_contents( $expectedFile, $actual );



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise