Arity for builtins (#28)

Old-style function call

Utility for running opa yaml tests

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2023-10-24 10:11:50 -07:00
committed by GitHub
parent 951bb6b14c
commit 800e594d52
25 changed files with 359 additions and 137 deletions
+5 -6
View File
@@ -31,7 +31,7 @@ fn basic() -> Result<()> {
set = {1, 2, 3}
"#;
let expected = vec![Value::from_json_str(
let expected = [Value::from_json_str(
r#" {
"array": [1, 2, 3],
"nested_array": [1, [2, 3, 4], 5, 6],
@@ -46,9 +46,8 @@ fn basic() -> Result<()> {
}"#,
)?];
assert_match(
eval_file(&[rego.to_owned()], None, None, "data.test", false)?,
expected,
);
Ok(())
check_output(
&eval_file(&[rego.to_owned()], None, None, "data.test", false)?,
&expected,
)
}