Fixed self assigned issue #1107

This commit is contained in:
Mike Farah
2022-02-20 14:29:52 +11:00
parent fc447b46ce
commit 665f6b0267
5 changed files with 53 additions and 6 deletions
+9
View File
@@ -28,6 +28,15 @@ var assignOperatorScenarios = []expressionScenario{
"D0, P[], (doc)::{a: null}\n",
},
},
{
skipDoc: true,
description: "self reference",
document: "a: cat",
expression: `.a = [.a]`,
expected: []string{
"D0, P[], (doc)::a:\n - cat\n",
},
},
{
description: "Update node to be the child value",
document: `{a: {b: {g: foof}}}`,