diff --git a/pkg/compiler/compiler_for_test.go b/pkg/compiler/compiler_for_test.go index b5be2722..7b8d13b7 100644 --- a/pkg/compiler/compiler_for_test.go +++ b/pkg/compiler/compiler_for_test.go @@ -86,6 +86,20 @@ func TestFor(t *testing.T) { []any{map[string]any{"a": 1}, map[string]any{"a": 2}, map[string]any{"a": 3}}, ShouldEqualJSON, }, + { + `FOR val IN 1..3 + FOR prop IN ["a"] + RETURN {[prop]: val}`, + []any{map[string]any{"a": 1}, map[string]any{"a": 2}, map[string]any{"a": 3}}, + ShouldEqualJSON, + }, + { + `FOR prop IN ["a"] + FOR val IN 1..3 + RETURN {[prop]: val}`, + []any{map[string]any{"a": 1}, map[string]any{"a": 2}, map[string]any{"a": 3}}, + ShouldEqualJSON, + }, { `FOR prop IN ["a"] FOR val IN [1, 2, 3]