Files
regorus/tests/parser/cases/expressions/membership.yaml
Anand Krishnamoorthi eded43bdc6 Fix key, value in membership and some-in
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-28 09:38:40 +05:30

53 lines
1.2 KiB
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic
rego: |
package test
import future.keywords.in
# key, value in collection
x = 0, 5 in [5]
# Chained in-exprs
y = 0, 5 in c in d
policy:
- spec:
head:
compr:
refr:
var: x
assign:
op: "="
value:
inexpr:
key:
number: 0
value:
number: 5
collection:
array:
- number: 5
bodies: []
- spec:
head:
compr:
refr:
var: y
assign:
op: "="
value:
inexpr:
value:
inexpr:
key:
number: 0
value:
number: 5
collection:
var: c
collection:
var: d
bodies: []