Skip to content

Commit

Permalink
Fix spurious whitespace in messages from sh2ju.
Browse files Browse the repository at this point in the history
<failure>
<![CDATA[
...
]]>
</failure>

creates a <failure> tag with text == "\n\n...\n".

It needs to be on one line.
  • Loading branch information
Ryan Hitchman committed Mar 29, 2018
1 parent 137268d commit 90d99b3
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions third_party/forked/shell2junit/sh2ju.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,13 @@ function juLog() {
# write the junit xml report
## failure tag
[[ ${err} = 0 ]] && failure="" || failure="
<failure type=\"ScriptError\" message=\"Script Error\">
<![CDATA[
${errMsg}
]]>
</failure>
<failure type=\"ScriptError\" message=\"Script Error\"><![CDATA[${errMsg}]]></failure>
"
## testcase tag
content="${content}
<testcase assertions=\"1\" name=\"${name}\" time=\"${time}\" classname=\"${class}\">
${failure}
<system-err>
<![CDATA[
${errMsg}
]]>
</system-err>
<system-err><![CDATA[${errMsg}]]></system-err>
</testcase>
"
## testsuite block
Expand Down

0 comments on commit 90d99b3

Please sign in to comment.