| 151 | | print Console_Color::convert(preg_replace(array('/^(\d+ examples?.*)/m', |
| 152 | | '/^( -)(.+)( \(ERROR|EXCEPTION\))/m', |
| 153 | | '/^( -)(.+)( \(FAIL\))/m', |
| 154 | | '/^( -)(.+)( \(PENDING\))/m', |
| 155 | | '/^( -)(.+)/m', |
| 156 | | '/(\d+\)\s+)(.+ (?:ERROR|EXCEPTION)\s+.+)/', |
| 157 | | '/(\d+\)\s+)(.+ FAILED\s+.+)/', |
| 158 | | '/(\d+\)\s+)(.+ PENDING\s+.+)/', |
| 159 | | '/^((?:Errors|Exceptions):)/m', |
| 160 | | '/^(Failures:)/m', |
| 161 | | '/^(Pending:)/m', |
| 162 | | '/(\x0d|\x0a|\x0d\x0a){2,}/' |
| 163 | | ), |
| 164 | | array("$colorCode\$1%n", |
| 165 | | '%p$1 $2$3%n', |
| 166 | | '%r$1 $2$3%n', |
| 167 | | '%y$1 $2$3%n', |
| 168 | | '%g$1 $2$3%n', |
| 169 | | '$1%p$2%n', |
| 170 | | '$1%r$2%n', |
| 171 | | '$1%y$2%n', |
| 172 | | '%p$1%n', |
| 173 | | '%r$1%n', |
| 174 | | '%y$1%n', |
| 175 | | "\n\n" |
| 176 | | ), |
| 177 | | Console_Color::escape($output)) |
| 178 | | ); |
| 179 | | } else { |
| 180 | | print $output; |
| | 154 | $output = Console_Color::convert(preg_replace(array('/^(\d+ examples?.*)/m', |
| | 155 | '/^( -)(.+)( \(ERROR|EXCEPTION\))/m', |
| | 156 | '/^( -)(.+)( \(FAIL\))/m', |
| | 157 | '/^( -)(.+)( \(PENDING\))/m', |
| | 158 | '/^( -)(.+)/m', |
| | 159 | '/(\d+\)\s+)(.+ (?:ERROR|EXCEPTION)\s+.+)/', |
| | 160 | '/(\d+\)\s+)(.+ FAILED\s+.+)/', |
| | 161 | '/(\d+\)\s+)(.+ PENDING\s+.+)/', |
| | 162 | '/^((?:Errors|Exceptions):)/m', |
| | 163 | '/^(Failures:)/m', |
| | 164 | '/^(Pending:)/m' |
| | 165 | ), |
| | 166 | array("$colorCode\$1%n", |
| | 167 | '%p$1$2$3%n', |
| | 168 | '%r$1$2$3%n', |
| | 169 | '%y$1$2$3%n', |
| | 170 | '%g$1$2$3%n', |
| | 171 | '$1%p$2%n', |
| | 172 | '$1%r$2%n', |
| | 173 | '$1%y$2%n', |
| | 174 | '%p$1%n', |
| | 175 | '%r$1%n', |
| | 176 | '%y$1%n' |
| | 177 | ), |
| | 178 | Console_Color::escape($output)) |
| | 179 | ); |