mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
49 lines
1.1 KiB
YAML
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: []
|