Introduce old redir program
[lcapit-junk-code.git] / prim / tests / run-tests
blob0e62f84d53993f1f05d23b3badb8ffb1b7726051
1 #!/bin/bash
3 BIN=prim
4 MAX_TESTS=5
5 TESTS_DIR=../tests
7 printf "\nRunning tests\n\n"
9 for ((i = 1; i <= $MAX_TESTS; i++)); do
10 printf "\t$i: "
11 ./$BIN ${TESTS_DIR}/graph${i}.txt > out.txt
12 cmp -s ${TESTS_DIR}/rest${i}.txt out.txt
13 if [ $? -eq 0 ]; then
14 printf "PASSED"
15 else
16 printf "FAILED"
18 printf "\n"
19 done
21 rm -f out.txt
22 printf "\n"