X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6106441685a38400d9aa94ccb7218218102f941c..8d2e57fdcca371daba8a1a07429ef84729e1f01f:/test/manpages/test-manpages diff --git a/test/manpages/test-manpages b/test/manpages/test-manpages index 7c221bae..3459a9e4 100755 --- a/test/manpages/test-manpages +++ b/test/manpages/test-manpages @@ -6,7 +6,12 @@ # ###################################################### -. ${MH_TEST_COMMON} +if test -z "${MH_OBJ_DIR}"; then + srcdir=`dirname "$0"`/../.. + MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR +fi + +. "$MH_OBJ_DIR/test/common.sh" setup_test @@ -26,8 +31,17 @@ 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 + +warnings="-ww $suppress_break_warning" + 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