From 89a53e9105d6875bade6020aa12e5f0bf13a4351 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 1 Feb 2024 09:16:14 -0800 Subject: [PATCH] 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. --- internal/command/views/test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/command/views/test.go b/internal/command/views/test.go index 371013a779..e9b9c3220c 100644 --- a/internal/command/views/test.go +++ b/internal/command/views/test.go @@ -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("", " ")