blob: 0ba61642c6379c7301042b16857b0b9d975d4a4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/sh
fail()
{
echo -e '[\e[1;31mFAIL\e[0m] '$i
}
pass()
{
echo -e '[\e[0;32mPASS\e[0m] '$i
}
#########################
# tests expected to pass
cd $(dirname $0)
export EXECUTABLE="$PWD/../pgm-interlace"
pushd pass >/dev/null
for i in *.sh ; do
name=${i/.sh/}
expected="$name.pgm.expected"
out="$name.pgm.out"
./$i
diff $expected $out
if [ $? -ne 0 ] ; then
fail
exit 1
fi
pass
rm $out
done
popd > /dev/null
|