Variable loop wip

This commit is contained in:
Mike Farah 2023-02-23 16:32:06 +11:00
parent 668e5600c3
commit 7ade7a97a5

View File

@ -44,6 +44,14 @@ var variableOperatorScenarios = []expressionScenario{
"D0, P[1], (!!int)::2\n",
},
},
{
skipDoc: true,
document: `[1, 2]`,
expression: `[.[] | . as $f | $f + 1]`,
expected: []string{
"D0, P[], (!!seq)::- 2\n- 3\n",
},
},
{
description: "Using variables as a lookup",
subdescription: "Example taken from [jq](https://stedolan.github.io/jq/manual/#Variable/SymbolicBindingOperator:...as$identifier|...)",