]> granicus.if.org Git - php/commitdiff
- Replace possible esc char to <esc> in the XML output
authorFelipe Pena <felipe@php.net>
Thu, 1 Dec 2011 15:47:58 +0000 (15:47 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 1 Dec 2011 15:47:58 +0000 (15:47 +0000)
run-tests.php

index 49f4bb2e90432d13165ec09ad4d50a21512c1b82..39686ce6c3e65e13293262a60eef8df6e5af673d 100755 (executable)
@@ -2100,11 +2100,11 @@ $output
                }
                elseif (in_array('FAIL', $restype)) {
                        $JUNIT['test_fail']++;
-                       $JUNIT['result_xml'] .= '<failure type="'.$restype[0].'ED" message="'.$info.'"><![CDATA['."\n".$diff."\n".']]></failure>'."\n";
+                       $JUNIT['result_xml'] .= '<failure type="'.$restype[0].'ED" message="'.$info.'"><![CDATA['."\n".preg_replace('/\e/', '<esc>', $diff)."\n".']]></failure>'."\n";
                }
                else{
                        $JUNIT['test_error']++;
-                       $JUNIT['result_xml'] .= '<error type="'.$restype[0].'ED" message="'.$info.'"><![CDATA['."\n".$diff."\n".']]></error>'."\n";
+                       $JUNIT['result_xml'] .= '<error type="'.$restype[0].'ED" message="'.$info.'"><![CDATA['."\n".preg_replace('/\e/', '<esc>', $diff)."\n".']]></error>'."\n";
                }
                $JUNIT['result_xml'] .= '</testcase>'."\n";
        }