mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 10:04:43 +08:00
Fixes xml decode missing tags #1284
This commit is contained in:
@@ -292,6 +292,22 @@ var xmlScenarios = []formatScenario{
|
||||
expected: "<cat>purrs</cat>\n",
|
||||
scenarioType: "encode",
|
||||
},
|
||||
{
|
||||
description: "includes map tags",
|
||||
skipDoc: true,
|
||||
input: "<cat>purrs</cat>\n",
|
||||
expression: `tag`,
|
||||
expected: "!!map\n",
|
||||
scenarioType: "decode",
|
||||
},
|
||||
{
|
||||
description: "includes array tags",
|
||||
skipDoc: true,
|
||||
input: "<cat>purrs</cat><cat>purrs</cat>\n",
|
||||
expression: `.cat | tag`,
|
||||
expected: "!!seq\n",
|
||||
scenarioType: "decode",
|
||||
},
|
||||
{
|
||||
description: "Encode xml: array",
|
||||
input: "pets:\n cat:\n - purrs\n - meows",
|
||||
|
||||
Reference in New Issue
Block a user