eval, lex, parse commands (#30)

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2023-10-30 21:45:43 -07:00
committed by GitHub
parent 63ecc44a48
commit 7a3d5e7e02
7 changed files with 142 additions and 262 deletions

View File

@@ -1,13 +0,0 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e
rego=$(realpath -e $1)
if [ ! -z "$2" ]; then
input=$(realpath -e $2)
cargo test interpreter::one_file -- --include-ignored --nocapture "$rego" "$input"
else
cargo test interpreter::one_file -- --include-ignored --nocapture "$rego"
fi

View File

@@ -1,27 +0,0 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e
usage="usage: rego-lex <policy.rego> [-v]"
if [ -z "$1" ]; then
echo "$usage"
exit 1
fi
rego=$(realpath -e $1)
case "$2" in
"-v")
verbose="verbose"
;;
*)
if [ ! -z "$2" ]; then
echo "$usage"
exit 1
fi
esac
eval "cargo test lexer::one_file -- --include-ignored --nocapture $rego $verbose"

View File

@@ -1,8 +0,0 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
set -e
rego=$(realpath -e $1)
cargo test parser::one_file -- --include-ignored --nocapture "$rego"