Skip to content

Commit 618547c

Browse files
committed
Add more map tests
1 parent 9bbb848 commit 618547c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tests/compliance/functions.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,8 @@
759759
{"a": 10, "b": 7, "c": "z"},
760760
{"a": 10, "b": 8, "c": null},
761761
{"a": 10, "b": 9}
762-
]
762+
],
763+
"empty": []
763764
},
764765
"cases": [
765766
{
@@ -773,6 +774,10 @@
773774
{
774775
"expression": "map(&a, badkey)",
775776
"error": "invalid-type"
777+
},
778+
{
779+
"expression": "map(&foo, empty)",
780+
"result": []
776781
}
777782
]
778783
}, {
@@ -802,5 +807,15 @@
802807
"result": [null, null, null]
803808
}
804809
]
810+
}, {
811+
"given": {
812+
"array": [[1, 2, 3, [4]], [5, 6, 7, [8, 9]]]
813+
},
814+
"cases": [
815+
{
816+
"expression": "map(&[], array)",
817+
"result": [[1, 2, 3, 4], [5, 6, 7, 8, 9]]
818+
}
819+
]
805820
}
806821
]

0 commit comments

Comments
 (0)