Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 445f9e515c
Fetching contributors…

Cannot retrieve contributors at this time

file 34 lines (28 sloc) 0.798 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<?php
/**
* Test unitaire de TextWheel
*
*/

$test = 'TextWheel';
$remonte = "../";
while (!is_dir($remonte."ecrire"))
$remonte = "../$remonte";
require $remonte.'tests/test.inc';
find_in_path("engine/tests/textwheeltest.php",'',true);

$testeur = new TextWheelTester(new TextWheelTestSet('textwheel.yaml'));
$results = $testeur->test();

$err = array();
if (!count($results))
die ('Erreur : aucun test!');
foreach($results as $titre=>$res){
if (!$res['result'])
$err[] = display_error($titre,'TextWheel()->text("'.$res['test']->input.'")'
//."<br />" . nl2br(print_r($res['test']->ruleset,true))
,$res['output'],$res['test']->output);
}

// si le tableau $err est pas vide ca va pas
if ($err) {
die ('<dl>' . join('', $err) . '</dl>');
}

echo "OK";

?>
Something went wrong with that request. Please try again.