diff --git a/pkg/yqlib/properties_test.go b/pkg/yqlib/properties_test.go index dcae4121..bf67d043 100644 --- a/pkg/yqlib/properties_test.go +++ b/pkg/yqlib/properties_test.go @@ -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.",