Changeset 5580
- Timestamp:
- 10/18/07 10:03:23 (6 years ago)
- Files:
-
- tools/lime/trunk/lib/lime.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/lime/trunk/lib/lime.php
r5575 r5580 648 648 <?php 649 649 xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); 650 ob_start();651 650 include('$file'); 652 ob_end_clean();653 651 echo '<PHP_SER>'.serialize(xdebug_get_code_coverage()).'</PHP_SER>'; 654 652 EOF; … … 666 664 foreach ($cov as $file => $lines) 667 665 { 666 if (!in_array($file, $this->files)) 667 { 668 continue; 669 } 670 668 671 if (!isset($coverage[$file])) 669 672 { … … 672 675 } 673 676 674 foreach ($lines as $line => $ count)677 foreach ($lines as $line => $flag) 675 678 { 676 if ($ count== 1)679 if ($flag == 1) 677 680 { 678 681 $coverage[$file][$line] = 1; … … 722 725 } 723 726 724 $output->echoln(sprintf("TOTAL COVERAGE: %3.0f%%", $total_ covered_lines * 100 / $total_php_lines));727 $output->echoln(sprintf("TOTAL COVERAGE: %3.0f%%", $total_php_lines ? $total_covered_lines * 100 / $total_php_lines : 0)); 725 728 } 726 729