Ticket #2028: fixed memory leak in mc_search__hex_translate_to_regex() function.
[kaloumi3.git] / maint / doctest
blobe6429606391540cef6e91b871a7792f65095b91c
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/mc.1.in || { echo "ERROR: cannot read doc/mc.1.in" 2>&1; exit 1; }
22 # Test the documentation for possible errors.
23 one_test find doc -name '*.[1-9].in' -exec groff -wall -mandoc -Tps {} \;
24 one_test find doc -name '*.[1-9].in' -exec nroff -mandoc -Tlatin1 {} \;
26 # Check the English manuals to be in ASCII.
27 one_test find doc -maxdepth 1 -name '*.[1-9].in' -exec groff -wall -Tascii {} \;
29 rm -rf doctest.err
30 exit 0