Added with operator

This commit is contained in:
Mike Farah
2021-09-12 21:52:02 +10:00
parent 0c3334d838
commit 6002604251
11 changed files with 91 additions and 13 deletions
+4 -3
View File
@@ -52,9 +52,10 @@ var variableOperatorScenarios = []expressionScenario{
},
},
{
description: "Use ref to reference a path repeatedly",
document: `a: {b: thing, c: something}`,
expression: `.a.b ref $x | $x = "new" | $x style="double"`,
description: "Use ref to reference a path repeatedly",
subdescription: "Note: You may find the `with` operator more useful.",
document: `a: {b: thing, c: something}`,
expression: `.a.b ref $x | $x = "new" | $x style="double"`,
expected: []string{
"D0, P[], (doc)::a: {b: \"new\", c: something}\n",
},