Ticket #2111: allow pause in copy/move/delete file operation.
[midnight-commander.git] / maint / doctest
blob504ecc590710d71e49c43acc6d500d544fc5d7f4
1 #!/bin/sh
3 # Run this script in the top-level source directory to check the
4 # documentation for compatibility with groff and nroff.
6 set -e
8 one_test() {
9 "$@" >/dev/null 2>doctest.err
10 if test -s doctest.err; then
11 echo "ERROR messages follow:" 2>&1
12 cat doctest.err 2>&1
13 echo "ERROR while running following command:" 2>&1
14 echo "$@" 2>&1
15 echo "ERROR messages are preserved in doctest.err"
16 exit 1
20 test -r doc/man/mc.1.in || { echo "ERROR: cannot read doc/mc.1.in" 2>&1; exit 1; }
22 # Test the documentation for possible errors.
23 for i in `find doc -name '*.[1-9].in'`; do
24 echo "test $i"
25 cat $i |preconv -e UTF8| groff -wall -mandoc -Tutf8 | grep "warning:"
26 done
28 for i in `find doc -name '*.[1-9].in'`; do
29 echo "test $i"
30 cat $i |preconv -e UTF8| nroff -Tutf8 -mandoc | grep "warning:"
31 done
33 # Check the English manuals to be in ASCII.
34 one_test find doc -maxdepth 1 -name '*.[1-9].in' -exec groff -wall -Tascii {} \;
36 rm -rf doctest.err
37 exit 0