summaryrefslogtreecommitdiff
path: root/sandbox/manpage-writer/lexgrog-test.sh
blob: 7c5bd772108eed378c0acb7562749b5bb093c423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#
# test manpages with lexgrog for whatis/apropos

DIR=output

CNT=0
ERR=0
FAILS=""
for F in $DIR/*.man ; do 
    CNT=$(( CNT + 1 ))
    lexgrog $F
    if test $? -ne 0 ; then
        ERR=$(( ERR + 1 ))
        FAILS="$FAILS $(basename $F)"
    fi
done
if test $ERR -eq 0 ; then
    echo "OK $CNT tests passed"
else
    echo "ERROR $ERR of $CNT tests failed"
    echo "-- $FAILS"
fi