diff --git a/pkg/yqlib/operator_booleans_test.go b/pkg/yqlib/operator_booleans_test.go index 2f3477d2..50708998 100644 --- a/pkg/yqlib/operator_booleans_test.go +++ b/pkg/yqlib/operator_booleans_test.go @@ -20,6 +20,14 @@ var booleanOperatorScenarios = []expressionScenario{ "D0, P[], (!!bool)::false\n", }, }, + { + skipDoc: true, + document: "b: false", + expression: `.b or .c`, + expected: []string{ + "D0, P[b], (!!bool)::false\n", + }, + }, { skipDoc: true, document: "b: hi", diff --git a/pkg/yqlib/operator_equals_test.go b/pkg/yqlib/operator_equals_test.go index e815f89d..6b7f2aa0 100644 --- a/pkg/yqlib/operator_equals_test.go +++ b/pkg/yqlib/operator_equals_test.go @@ -12,6 +12,22 @@ var equalsOperatorScenarios = []expressionScenario{ "D0, P[], (!!bool)::true\n", }, }, + { + skipDoc: true, + document: `a: cat`, + expression: ".a == .b", + expected: []string{ + "D0, P[a], (!!bool)::false\n", + }, + }, + { + skipDoc: true, + document: `a: cat`, + expression: ".b == .a", + expected: []string{ + "D0, P[a], (!!bool)::false\n", + }, + }, { skipDoc: true, document: "cat",