Skip to content

Commit

Permalink
Improved unittest.
Browse files Browse the repository at this point in the history
  • Loading branch information
frasten committed Dec 20, 2009
1 parent e81e741 commit 640381c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions unittest
Expand Up @@ -29,6 +29,7 @@ $patterns = array(
// <span foreground="#000000">a</span><span foreground="#00007d">b</span><span foreground="#0000fa">(</span><span foreground="#0000177">*</span><span foreground="#00001f4">)</span>

$counter = 1;
$num_errors = 0;
foreach ($patterns as $pattern => $expected) {
echo "Testing pattern $counter... ";
//test($pattern);
Expand All @@ -47,10 +48,18 @@ foreach ($patterns as $pattern => $expected) {
echo "$expected\n";
echo "RESULT:\n";
echo "$result\n\n";
$num_errors++;
}
$counter++;
}

echo str_repeat('=', 60) . "\n";
echo "Total: " . sizeof($patterns) . "\n";
echo "Errors: $num_errors\n";




function replace_lowercase($matches) {
return "{$matches[1]}=\"" . strtolower($matches[2]) . "\"";
}
Expand Down

0 comments on commit 640381c

Please sign in to comment.