Files
regorus/tests/interpreter/cases/rule/object.yaml
T
Anand Krishnamoorthi cb0b3a1790 Code from github.com/anakrish/rego-rs
Authored by anakrish and mingweishih

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-09 10:56:54 -08:00

36 lines
551 B
YAML

# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
cases:
- note: simple
data: {}
modules:
- |
package test
x[a] = b {
a = "hello"
b = "world"
}
query: data.test
want_result:
x:
"hello": "world"
- note: loop
data: {}
modules:
- |
package test
x[a] = b {
a = ["hello", "world"][_]
b = 1
}
query: data.test
want_result:
x:
"hello": 1
"world": 1