Changeset 19794
- Timestamp:
- 07/01/09 16:56:32 (4 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
r19792 r19794 36 36 37 37 $this->options = array_merge(array( 38 'base_dir' => null,39 38 'force_colors' => false, 40 39 'output' => null, … … 43 42 44 43 $this->output = $this->options['output'] ? $this->options['output'] : new lime_output($this->options['force_colors']); 45 $this->options['base_dir'] = realpath($this->options['base_dir']);46 44 47 45 $caller = $this->find_caller(debug_backtrace()); … … 532 530 // return the first call 533 531 $last = count($traces) - 1; 534 $file = $traces[$last]['file']; 535 if ($this->options['base_dir']) 536 { 537 $file = str_replace(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->options['base_dir']), '', str_replace(array('/', '\\'), $file)); 538 } 539 return array($file, $traces[$last]['line']); 532 return array($traces[$last]['file'], $traces[$last]['line']); 540 533 } 541 534 } … … 895 888 { 896 889 $this->output->echoln(''); 897 $this->output->error($t estsuite['file']);890 $this->output->error($this->get_relative_file($testsuite['file']).$this->extension); 898 891 $first = false; 899 892 } 900 893 901 $this->output->comment(sprintf(' at %s line %s', $t estsuite['tests'][$testcase]['file'], $testsuite['tests'][$testcase]['line']));894 $this->output->comment(sprintf(' at %s line %s', $this->get_relative_file($testsuite['tests'][$testcase]['file']).$this->extension, $testsuite['tests'][$testcase]['line'])); 902 895 $this->output->info(' '.$testsuite['tests'][$testcase]['message']); 903 896 $this->output->echoln($testsuite['tests'][$testcase]['error'], null, false);