X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/93a31f9b884f8e8f3f7a7d50cf90ffd365a14f7c..27659f0aa30c07081f7b8647c51a6ca82837e5d1:/test/manpages/test-manpages diff --git a/test/manpages/test-manpages b/test/manpages/test-manpages index 7cb7db81..8ad63371 100755 --- a/test/manpages/test-manpages +++ b/test/manpages/test-manpages @@ -7,8 +7,8 @@ ###################################################### if test -z "${MH_OBJ_DIR}"; then - srcdir=`dirname $0`/../.. - MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR + srcdir=`dirname "$0"`/../.. + MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR fi . "$MH_OBJ_DIR/test/common.sh" @@ -31,8 +31,21 @@ actual=$MH_TEST_DIR/$$.actual rm -f "$expected" "$actual" touch "$expected" "$actual" +#### If the prefix is too long, groff will report that it can't break +#### the `aliasfiles' line in ali.1. +length=`echo $prefix | awk '{print length($0)}'` +[ $length -gt 35 ] && suppress_break_warning=-Wbreak + +#### OpenBSD's mandoc spits out a lot of warnings. +case `uname -s` in + OpenBSD) warnings="-ww -Wel $suppress_break_warning" ;; + *) warnings="-ww $suppress_break_warning" ;; +esac + for manpage in man?/*.?; do - groff -Tutf8 -mandoc -wmac "$manpage" > /dev/null 2>>"$actual" + groff -Tutf8 -mandoc $warnings "$manpage" >/dev/null 2>>"$actual" done -diff -u "$expected" "$actual" +check "$expected" "$actual" + +exit $failed