mirror of
https://github.com/mikefarah/yq.git
synced 2025-02-04 01:55:46 +00:00
Added test for #878
This commit is contained in:
parent
b9d01f1e95
commit
3394feee0d
@ -91,6 +91,16 @@ var stringsOperatorScenarios = []expressionScenario{
|
|||||||
"D0, P[1], (!!bool)::false\n",
|
"D0, P[1], (!!bool)::false\n",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
skipDoc: true,
|
||||||
|
document: `["cat*", "cat*", "cat"]`,
|
||||||
|
expression: `.[] | test("cat\*")`,
|
||||||
|
expected: []string{
|
||||||
|
"D0, P[0], (!!bool)::true\n",
|
||||||
|
"D0, P[1], (!!bool)::true\n",
|
||||||
|
"D0, P[2], (!!bool)::false\n",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
description: "Substitute / Replace string",
|
description: "Substitute / Replace string",
|
||||||
subdescription: "This uses golang regex, described [here](https://github.com/google/re2/wiki/Syntax)\nNote the use of `|=` to run in context of the current string value.",
|
subdescription: "This uses golang regex, described [here](https://github.com/google/re2/wiki/Syntax)\nNote the use of `|=` to run in context of the current string value.",
|
||||||
|
Loading…
Reference in New Issue
Block a user