set -e
ALL_SECTIONS=(methods modules)
GREEN='[32m'
BOLD='[1m'
NC='(B[m'
h() {
header_name=$(echo "$@" | tr "[:lower:]" "[:upper:]")
echo "$GREEN$BOLD===== $header_name =====$NC"
}
cd "$(dirname "$0")"
(
cd tests
python3 -I not_impl_gen.py
)
cargo build --release
if [ $# -eq 0 ]; then
sections=(${ALL_SECTIONS[@]})
else
sections=($@)
fi
for section in "${sections[@]}"; do
section=$(echo "$section" | tr "[:upper:]" "[:lower:]")
snippet=tests/snippets/whats_left_$section.py
if ! [[ -f $snippet ]]; then
echo "Invalid section $section" >&2
continue
fi
h "$section" >&2
cargo run --release -q -- "$snippet"
done