Adding test for #2404

This commit is contained in:
Mike Farah 2025-07-23 13:45:44 +10:00
parent a3d9e0172f
commit 023c85e1e2
2 changed files with 10 additions and 1 deletions

View File

@ -216,6 +216,15 @@ var fixedAnchorOperatorScenarios = []expressionScenario{
"D0, P[m], (!!map)::{a: 42}\n",
},
},
{
skipDoc: true,
description: "deleting after explode",
document: "x: 37\na: &a\n b: 42\n<<: *a",
expression: `explode(.) | del(.x)`,
expected: []string{
"D0, P[], (!!map)::a:\n b: 42\nb: 42\n",
},
},
}
var badAnchorOperatorScenarios = []expressionScenario{

View File

@ -1,5 +1,5 @@
4.47.1:
- Fixed merge anchor behaviour (`<<`); #2110, #2386, #2178 Huge thanks to @stevenwdv!
- Fixed merge anchor behaviour (`<<`); #2404, #2110, #2386, #2178 Huge thanks to @stevenwdv!
Note that you will need to set --yaml-fix-merge-anchor-to-spec to see the fixes
- Fixed panic for syntax error when creating a map #2423
- Bumped dependencies