Debian Codegraph @

tests/runtests

raw symbols SCIP
1 #!/bin/sh
2
3 ##############################################################################
4 # small wrapper script to run the STAR/CIF syntax test suite #
5 ##############################################################################
6
7 CLEAR="tput clear" # command to clear screen
8
9 for F in ciftest[0-9] ciftest[0-9][0-9]
10 do
11 ${CLEAR}
12 echo "=============================================================="
13 # Diplay purpose (with trick for empty file)
14 echo $F
15 if grep "# Purpose" $F
16 then
17 true
18 else
19 if [ -s $F ]
20 then
21 true
22 else
23 echo "# Purpose: null file"
24 fi
25 fi
26
27 # Test with vcif
28 echo
29 echo "--------------------------------------------------------------"
30 echo "Testing against CIF syntax"
31 echo
32
33 vcif $F > $F.result
34 if [ -s $F.result ]
35 then
36 cat $F.result
37 else
38 if [ -f $F.result ]; then echo "(Valid)"; fi
39 fi
40
41 # Compare against canonical vcif run
42 if [ -f $F.result -a -f $F.result.canon ]
43 then
44 if cmp $F.result $F.result.canon > /dev/null
45 then
46 true # got the expected result
47 else
48 echo ""
49 echo "--------------------------------------------------------------"
50 echo "WARNING!! This is different from the canonical result!"
51 echo "Check your version of vcif"
52 fi
53 fi
54
55 echo "=============================================================="
56 echo
57 echo "Press ENTER for next test"
58 read foo
59 done
60
61 echo "End of suite"
62 exit