mkhtml2: add some experiemnts on loading speed
[gtk-doc.git] / tests / fail.sh
blobf91ec379b42947ee8ca0f76b967b7e5705f30c47
1 #!/bin/sh
3 dir=`dirname $0`
4 suite="fail"
5 DOC_MODULE="tester"
6 failed=0
7 tested=0
9 cd $dir/$suite/docs
11 echo "Running suite(s): gtk-doc-$suite";
13 # tests
14 # check missing section description
15 # we can't just check for a missing "tester_nodocs" entry
16 grep >/dev/null "tester_nodocs:Long_Description" $DOC_MODULE-undocumented.txt
17 if test $? = 1 ; then failed=`expr $failed + 1`; fi
18 tested=`expr $tested + 1`
20 # check missing section long description
21 grep >/dev/null "tester_nolongdesc:Long_Description" $DOC_MODULE-undocumented.txt
22 if test $? = 1 ; then failed=`expr $failed + 1`; fi
23 tested=`expr $tested + 1`
25 # check missing section short description
26 grep >/dev/null "tester_noshortdesc:Short_Description" $DOC_MODULE-undocumented.txt
27 if test $? = 1 ; then failed=`expr $failed + 1`; fi
28 tested=`expr $tested + 1`
30 # check enums
31 grep >/dev/null "EnumNoItemDocs (<items>)" $DOC_MODULE-undocumented.txt
32 if test $? = 1 ; then failed=`expr $failed + 1`; fi
33 tested=`expr $tested + 1`
35 # summary
36 successes=`expr $tested - $failed`
37 rate=`expr 100 \* $successes / $tested`;
38 echo "$rate %: Checks $tested, Failures: $failed"
40 test $failed = 0
41 exit $?