* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / tests / Test.sh
1 if ($1 $2 > $2.thisoutput 2> $2.this2output)
2 then
3 # no Error returned
4         if [ -f $2.2output ]
5         then
6         # Error should have been returned
7                 echo "$2:       returned ok, but should have failed"
8                 head $2.output
9                 exit
10         fi
11         
12         if (diff $2.output $2.thisoutput > /dev/null)
13         then
14                 echo "$2:       OK"
15         else
16                 echo "$2:       failed"
17                 diff $2.output $2.thisoutput | head
18         fi
19 else
20 # Error returned
21         if [ ! -f $2.2output ]
22         then
23         # No Error should have been returned
24                 echo "$2:       failed, but should have returned ok"
25                 head $2.this2output
26                 exit
27         fi
28         if ((diff $2.output $2.thisoutput >/dev/null) && (diff $2.2output $2.this2output >/dev/null))
29         then
30                 echo "$2:       OK"
31         else
32                 echo "$2:       failed"
33                 diff $2.output $2.thisoutput | head
34                 diff $2.2output $2.this2output | head
35         fi
36 fi              
37