Fixed merge globbing wildcards in keys #2564

This commit is contained in:
Mike Farah
2026-01-31 15:44:50 +11:00
parent bdeedbd275
commit 4bbffa9022
4 changed files with 28 additions and 3 deletions
+19
View File
@@ -86,7 +86,26 @@ c:
<<: *cat
`
var mergeWithGlobA = `
"**cat": things,
"meow**cat": stuff
`
var mergeWithGlobB = `
"**cat": newThings,
`
var multiplyOperatorScenarios = []expressionScenario{
{
description: "glob keys are treated as literals when merging",
skipDoc: true,
document: mergeWithGlobA,
document2: mergeWithGlobB,
expression: `select(fi == 0) * select(fi == 1)`,
expected: []string{
"D0, P[], (!!map)::\n\"**cat\": newThings,\n\"meow**cat\": stuff\n",
},
},
{
skipDoc: true,
document: mergeArrayWithAnchors,