#!/bin/sh
execute="cargo run --release --quiet -- "

for name in tests/*.sh; do
    expect=$(/bin/sh $name)
    actual=$($execute $name || echo "Failed")
    printf "\x1B[1m%s\x1B[0m: " $name
    if [ "$actual" == "$expect" ]; then
        printf "\x1B[1;32mOK\x1B[0m\n"
    else
        printf "\x1B[1;31mFAIL\x1B[0m\n"
    fi
done
