Files
regorus/tests/parser/cases/expressions/call.yaml
Ming-Wei Shih c0972ad2ba Update license to MIT
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
2023-02-09 19:40:35 +00:00

49 lines
1.1 KiB
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic
rego: |
package test
# A call in rule-ref. This creates an object.
deny[sprintf("Hello %v", ["world"])] = 1
# Trailing comma
x = inc(5,)
policy:
- spec:
head:
compr:
refr:
refbrack:
refr:
var: deny
index:
call:
fcn:
var: sprintf
params:
- string: "Hello %v"
- array:
- string: "world"
assign:
op: =
value:
number: 1
bodies: []
- spec:
head:
compr:
refr:
var: x
assign:
op: "="
value:
call:
fcn:
var: inc
params:
- number: 5
bodies: []