Fixing add when there is no node match #2325

This commit is contained in:
Mike Farah
2025-03-25 15:35:16 +11:00
parent 1395d6e230
commit 337960a6d1
2 changed files with 17 additions and 2 deletions
+9
View File
@@ -310,6 +310,15 @@ var addOperatorScenarios = []expressionScenario{
"D0, P[], (!!map)::a: !cat Saturday, 15-Dec-01 at 6:00AM GMT\n",
},
},
{
skipDoc: true,
description: "Add to empty",
subdescription: "should behave like null",
expression: `.nada + "cat"`,
expected: []string{
"D0, P[], (!!str)::cat\n",
},
},
{
description: "Add to null",
subdescription: "Adding to null simply returns the rhs",