Changeset 4115
- Timestamp:
- 05/29/07 08:55:26 (1 year ago)
- Files:
-
- tools/lime/trunk/lib/lime.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/lime/trunk/lib/lime.php
r4112 r4115 466 466 if ($delta > 0) 467 467 { 468 $this->output->echoln(sprintf('%s%s%s', substr($relative_file, - 67), str_repeat('.', 70 - min(67, strlen($relative_file))), $this->output->colorizer->colorize(sprintf('# Looks like you planned %d tests but only ran %d.', $this->stats[$file]['plan'], $this->stats[$file]['nb_tests']), 'COMMENT')));468 $this->output->echoln(sprintf('%s%s%s', substr($relative_file, -min(67, strlen($relative_file))), str_repeat('.', 70 - min(67, strlen($relative_file))), $this->output->colorizer->colorize(sprintf('# Looks like you planned %d tests but only ran %d.', $this->stats[$file]['plan'], $this->stats[$file]['nb_tests']), 'COMMENT'))); 469 469 $this->stats[$file]['status'] = 'dubious'; 470 470 $this->stats[$file]['status_code'] = 255; … … 477 477 else if ($delta < 0) 478 478 { 479 $this->output->echoln(sprintf('%s%s%s', substr($relative_file, - 67), str_repeat('.', 70 - min(67, strlen($relative_file))), $this->output->colorizer->colorize(sprintf('# Looks like you planned %s test but ran %s extra.', $this->stats[$file]['plan'], $this->stats[$file]['nb_tests'] - $this->stats[$file]['plan']), 'COMMENT')));479 $this->output->echoln(sprintf('%s%s%s', substr($relative_file, -min(67, strlen($relative_file))), str_repeat('.', 70 - min(67, strlen($relative_file))), $this->output->colorizer->colorize(sprintf('# Looks like you planned %s test but ran %s extra.', $this->stats[$file]['plan'], $this->stats[$file]['nb_tests'] - $this->stats[$file]['plan']), 'COMMENT'))); 480 480 $this->stats[$file]['status'] = 'dubious'; 481 481 $this->stats[$file]['status_code'] = 255; … … 492 492 } 493 493 494 $this->output->echoln(sprintf('%s%s%s', substr($relative_file, - 67), str_repeat('.', 70 - min(67, strlen($relative_file))), $this->stats[$file]['status']));494 $this->output->echoln(sprintf('%s%s%s', substr($relative_file, -min(67, strlen($relative_file))), str_repeat('.', 70 - min(67, strlen($relative_file))), $this->stats[$file]['status'])); 495 495 if (($nb = count($this->stats[$file]['failed'])) || $return > 0) 496 496 { … … 518 518 if (!in_array($file, $this->stats['_failed_files'])) continue; 519 519 520 $this->output->echoln(sprintf($format, substr($this->get_relative_file($file), -30), $file_stat['status_code'], count($file_stat['failed']) + count($file_stat['passed']), count($file_stat['failed']), implode(' ', $file_stat['failed']))); 520 $relative_file = $this->get_relative_file($file); 521 $this->output->echoln(sprintf($format, substr($relative_file, -min(30, strlen($relative_file))), $file_stat['status_code'], count($file_stat['failed']) + count($file_stat['passed']), count($file_stat['failed']), implode(' ', $file_stat['failed']))); 521 522 } 522 523 … … 655 656 $total_covered_lines += count($cov); 656 657 657 $output->echoln(sprintf("%-70s %3.0f%%", substr($this->get_relative_file($file), -70), $percent), $percent == 100 ? 'INFO' : ($percent > 90 ? 'PARAMETER' : ($percent < 20 ? 'ERROR' : ''))); 658 $relative_file = $this->get_relative_file($file); 659 $output->echoln(sprintf("%-70s %3.0f%%", substr($relative_file, -min(70, strlen($relative_file))), $percent), $percent == 100 ? 'INFO' : ($percent > 90 ? 'PARAMETER' : ($percent < 20 ? 'ERROR' : ''))); 658 660 if ($this->verbose && $percent != 100) 659 661 {