#! /bin/sh

# Jonathan Frech, 21st of July 2020
# Verifies output generated from various '99 Bottles of Beer' approaches.

root="$(realpath "$(dirname "$0")")"
tmp="$root/.verify-tmp"

mkdir -p "$tmp"
find "$root" | grep '\.py$' | grep 'strategy' | while read py; do
    printf 'Testing "%s" ...\n' "$py"
    python2 "$py" > "$tmp/$(basename "$py").out"
done

sha512sum "$tmp/"*
rm -r "$tmp"
