release: update news and date in manual
[gtk-doc.git] / tests / fail.sh
bloba11672995003e466b7e6d01434361e68a68ccc83
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=$(($failed + 1)); fi
18 tested=$(($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=$(($failed + 1)); fi
23 tested=$(($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=$(($failed + 1)); fi
28 tested=$(($tested + 1))
30 # check enums
31 grep >/dev/null "EnumNoItemDocs (<items>)" $DOC_MODULE-undocumented.txt
32 if test $? = 1 ; then failed=$(($failed + 1)); fi
33 tested=$(($tested + 1))
35 # summary
36 rate=$((100*($tested - $failed)/$tested));
37 echo "$rate %: Checks $tested, Failures: $failed"
39 test $failed = 0
40 exit $?