Files
regorus/tests/interpreter/cases/rule/old_set.yaml
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

32 lines
548 B
YAML

# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
cases:
- note: index-syntax
data: {}
modules:
- |
package test
x[a] {
a = ["hello", "world"][_]
}
query: data.test
want_result:
x:
set!: ["hello", "world"]
- note: special-case-field-syntax
data: {}
modules:
- |
package test
x.a {
a = ["hello", "world"][_]
true
}
query: data.test
want_result:
x:
set!: ["a"]