Added from_props

This commit is contained in:
Mike Farah
2022-03-28 19:48:30 +11:00
parent bc2118736b
commit 186b319093
5 changed files with 31 additions and 2 deletions
@@ -63,6 +63,14 @@ var encoderDecoderOperatorScenarios = []expressionScenario{
`,
},
},
{
description: "Decode props encoded string",
document: `a: "cats=great\ndogs=cool as well"`,
expression: `.a |= from_props`,
expected: []string{
"D0, P[], (doc)::a:\n cats: great\n dogs: cool as well\n",
},
},
{
skipDoc: true,
document: "a:\n cool:\n bob: dylan",