Fixed boolean op with empty context issue

This commit is contained in:
Mike Farah
2021-05-09 12:44:05 +10:00
parent 25d0787011
commit 37f3e21970
6 changed files with 111 additions and 14 deletions
+10
View File
@@ -14,6 +14,16 @@ var selectOperatorScenarios = []expressionScenario{
"D0, P[1], (!!str)::goat\n",
},
},
{
skipDoc: true,
document: "a: hello",
document2: "b: world",
expression: `select(.a == "hello" or .b == "world")`,
expected: []string{
"D0, P[], (doc)::a: hello\n",
"D0, P[], (doc)::b: world\n",
},
},
{
skipDoc: true,
document: `[{animal: cat, legs: {cool: true}}, {animal: fish}]`,