command/test: Fix invalid XML processing instruction

Annoyingly, I seem to have flubbed this slightly while I was adapting to
use enc.EncodeToken instead of (as originally written) just writing the
literal processing instruction bytes onto the front of the buffer
directly.

This made the output invalid for any XML processor that interprets the
special "xml" processing instruction. It'll now be valid again.
pull/34617/head
Martin Atkins 2 years ago
parent 5d06bc80d7
commit 89a53e9105

@ -828,7 +828,7 @@ func junitXMLTestReport(suite *moduletest.Suite) ([]byte, error) {
enc := xml.NewEncoder(&buf)
enc.EncodeToken(xml.ProcInst{
Target: "xml",
Inst: []byte(`version="1.0" encoding="UTF-8`),
Inst: []byte(`version="1.0" encoding="UTF-8"`),
})
enc.Indent("", " ")

Loading…
Cancel
Save