This commit is contained in:
Mike Farah 2023-04-03 17:29:33 +10:00
parent 8fef31b417
commit 54f5c9ee2f

View File

@ -147,6 +147,32 @@ var propertyScenarios = []formatScenario{
expected: expectedDecodedYaml,
scenarioType: "decode",
},
{
skipDoc: true,
description: "Decode properties - keeps key information",
input: expectedPropertiesUnwrapped,
expression: ".person.name | key",
expected: "name",
scenarioType: "decode",
},
{
skipDoc: true,
description: "Decode properties - keeps parent information",
input: expectedPropertiesUnwrapped,
expression: ".person.name | parent",
expected: "name",
scenarioType: "decode",
},
{
skipDoc: true,
description: "Decode properties - keeps path information",
input: expectedPropertiesUnwrapped,
expression: ".person.name | path",
expected: "name",
scenarioType: "decode",
},
{
description: "Decode properties - array should be a map",
subdescription: "If you have a numeric map key in your property files, use array_to_map to convert them to maps.",