mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 18:24:57 +08:00
Added subset example
This commit is contained in:
@@ -33,6 +33,15 @@ var containsOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (!!bool)::true\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Array has a subset array",
|
||||
subdescription: "Subtract the superset array from the subset, if there's anything left, it's not a subset",
|
||||
document: `["foobar", "foobaz", "blarp"]`,
|
||||
expression: `["baz", "bar"] - . | length == 0`,
|
||||
expected: []string{
|
||||
"D0, P[], (!!bool)::false\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
skipDoc: true,
|
||||
expression: `["dog", "cat", "giraffe"] | contains(["camel"])`,
|
||||
|
||||
Reference in New Issue
Block a user