mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-10 08:35:42 +00:00
Adding failing test for comments losing their position when in between xml nodes.
This commit is contained in:
parent
f6a48b6899
commit
c3691f2185
@ -259,6 +259,11 @@ var xmlScenarios = []formatScenario{
|
|||||||
input: "<root>value<!-- comment-->anotherValue </root>",
|
input: "<root>value<!-- comment-->anotherValue </root>",
|
||||||
expected: "root:\n # comment\n - value\n - anotherValue\n",
|
expected: "root:\n # comment\n - value\n - anotherValue\n",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
skipDoc: true,
|
||||||
|
input: "<root><cats><cat>quick</cat><cat>soft</cat><!-- kitty_comment--><cat>squishy</cat></cats></root>",
|
||||||
|
expected: "root:\n cats:\n cat:\n - quick\n - soft\n # kitty_comment\n - squishy\n",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
description: "Parse xml: simple",
|
description: "Parse xml: simple",
|
||||||
subdescription: "Notice how all the values are strings, see the next example on how you can fix that.",
|
subdescription: "Notice how all the values are strings, see the next example on how you can fix that.",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user