]> 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 127265798a382d4fa6e51efe5d6ea35703168528..3fba338dca791d34e78e1d5c069b014e5d2f86ca 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";
        }