Skip to content

Commit fa5cacd

Browse files
committed
fixup! tests: optionally write results as JUnit-style .xml
Actually, seems like \x1c is never valid in an XML... so let's use the replacement character for such values. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 79943a2 commit fa5cacd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/test-lib.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,10 +894,10 @@ xml_attr_encode () {
894894
printf '%s\n' "$@" |
895895
sed -e 's/&/\&amp;/g' -e "s/'/\&apos;/g" -e 's/"/\&quot;/g' \
896896
-e 's/</\&lt;/g' -e 's/>/\&gt;/g' \
897-
-e "s/$(printf \\x1c)/\\&#x1c;/g" \
898-
-e "s/$(printf \\x1d)/\\&#x1d;/g" \
899-
-e "s/$(printf \\x1e)/\\&#x1d;/g" \
900-
-e "s/$(printf \\x1f)/\\&#x1f;/g" \
897+
-e "s/$(printf \\x1c)/\\&#xfffd;/g" \
898+
-e "s/$(printf \\x1d)/\\&#xfffd;/g" \
899+
-e "s/$(printf \\x1e)/\\&#xfffd;/g" \
900+
-e "s/$(printf \\x1f)/\\&#xfffd;/g" \
901901
-e 's/ /\&#x09;/g' -e 's/$/\&#x0a;/' -e '$s/&#x0a;$//' |
902902
tr -d '\012\015'
903903
}

0 commit comments

Comments
 (0)