Replace -J flag with junit-xml output format

Rearrange output functions so they support outputting text alongside other formats, if specified
Add a convenience function for checking if JUnit output is enabled
Move monochrome setting into loop so it better supports multiple formats
Update README
This commit is contained in:
Marc Jay
2020-04-15 23:36:40 +01:00
parent dc31adcc18
commit 78f649bd65
5 changed files with 78 additions and 80 deletions

View File

@@ -15,6 +15,14 @@
JUNIT_OUTPUT_DIRECTORY="junit-reports"
is_junit_output_enabled() {
if [[ ${MODES[@]} =~ "junit-xml" ]]; then
true
else
false
fi
}
xml_escape() {
sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/\"/\&quot;/g; s/'"'"'/\&#39;/g' <<< "$1"
}