#!/bin/bash
for test in ./test/interp4/*.4
do
    test=${test##*/}
    printf "\033[01;36m Testing $test\033[39m\t: "
    expected=$(cat ./test/interp4/expected_out/$test)
    actual=$(cabal run interp4 -- ./test/interp4/$test | tail -n 1)
    if [ "$actual" = "$expected" ];
        then echo -e "\033[92m PASS"
        else  echo -e "033[91m FAIL"
    fi
done