#!/bin/bash
tmp=/tmp/free42-raise.raw
fail=0
attempts=0
for t in \
    tests/dm32/*.d32 $(find ../../dm32 -name \*.d32) \
    tests/hp15c/*.15c $(find ../../hp15c -name \*.15c) \
    tests/rlm11c/*.11c $(find ../../rlm11c -name \*.11c)
do
    attempts=$((attempts + 1))
    if ! ./rejig $t -o $tmp > /dev/null 2>&1
    then
        echo -e "\033[31mFAIL: $t\033[0m"
        fail=$((fail + 1))
    fi
done
ok=$((attempts - fail))
echo -e "\033[32m\n$ok of $attempts OK\033[0m"
