#!/bin/bash cd "$(dirname $0)" EXECUTABLE="$PWD/../simulator" echo $PWD for src in invalid-hence/*.hence ; do outfile="$(mktemp)" "$EXECUTABLE" "$src" 2> "$outfile" if diff "$src.expected" "$outfile" ; then echo -ne '[\e[0;32mPASS\e[0m]' rm "$outfile" else echo -ne '[\e[1;31mFAIL\e[0m]' fi echo " $src" done #for src in valid-hence/*.hence ; do # outfile="$(mktemp)" # "$EXECUTABLE" "$src" > "$outfile" # if diff "$src.expected" "$outfile" >/dev/null ; then # echo "$src: PASS" # else # echo "$src: FAIL" # fi #done