From c3691f2185b37c809925805d7fb11ad9b5e07f62 Mon Sep 17 00:00:00 2001 From: Lilith Date: Wed, 14 Dec 2022 16:14:28 -0800 Subject: [PATCH] Adding failing test for comments losing their position when in between xml nodes. --- pkg/yqlib/xml_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/yqlib/xml_test.go b/pkg/yqlib/xml_test.go index 042cf244..3a97d11d 100644 --- a/pkg/yqlib/xml_test.go +++ b/pkg/yqlib/xml_test.go @@ -259,6 +259,11 @@ var xmlScenarios = []formatScenario{ input: "valueanotherValue ", expected: "root:\n # comment\n - value\n - anotherValue\n", }, + { + skipDoc: true, + input: "quicksoftsquishy", + expected: "root:\n cats:\n cat:\n - quick\n - soft\n # kitty_comment\n - squishy\n", + }, { description: "Parse xml: simple", subdescription: "Notice how all the values are strings, see the next example on how you can fix that.",