Added test for #878

This commit is contained in:
Mike Farah 2021-07-09 15:58:33 +10:00
parent b9d01f1e95
commit 3394feee0d

View File

@ -91,6 +91,16 @@ var stringsOperatorScenarios = []expressionScenario{
"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",
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.",