sorting-algorithms/test/CheckSortedOutputs.sh

22 lines
653 B
Bash
Executable File

#!/bin/bash
for ((i=1;i<=10;i++));do
diff -w test/OUTPUT/IS$((i*15))K.txt test/SORTED/sorted$((i*15))K.txt &>/dev/null
if [[ $? -eq 0 ]]; then
echo "IS$((i*15))K passed"
else
echo "IS$((i*15))K failed"
fi
diff -w test/OUTPUT/MS$((i*15))K.txt test/SORTED/sorted$((i*15))K.txt &>/dev/null
if [[ $? -eq 0 ]]; then
echo "MS$((i*15))K passed"
else
echo "MS$((i*15))K failed"
fi
diff -w test/OUTPUT/HS$((i*15))K.txt test/SORTED/sorted$((i*15))K.txt &>/dev/null
if [[ $? -eq 0 ]]; then
echo "HS$((i*15))K passed"
else
echo "HS$((i*15))K failed"
fi
echo ""
done