#!/bin/bash


# Names of the test and test solution
testprogram=$1
testsolution=$1.out

# Create a temporal file
output=$(tempfile) || exit

$testprogram > $output 2>/dev/null

result=$(diff -q  "$testsolution" "$output") 

if [ "$result" ]
then
	echo -e "$testprogram:\tError"
else
	echo -e "$testprogram:\tOK"
fi

# Delete the temporal file
rm -f "$outpput"

