repo.or.cz
/
lcapit-junk-code.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Introduce old redir program
[lcapit-junk-code.git]
/
prim
/
tests
/
run-tests
blob
0e62f84d53993f1f05d23b3badb8ffb1b7726051
1
#!/bin/bash
2
3
BIN
=
prim
4
MAX_TESTS
=
5
5
TESTS_DIR
=
..
/
tests
6
7
printf
"
\n
Running tests
\n\n
"
8
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"
17
fi
18
printf
"
\n
"
19
done
20
21
rm
-f
out.txt
22
printf
"
\n
"