]> diplodocus.org Git - nmh/blobdiff - test/manpages/test-manpages
Reverted commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.
[nmh] / test / manpages / test-manpages
index 570ff33543a4b12f25557c6138f3b63294440f6d..6b2ee95a9add941f2780dfe984c0909ae5c036dd 100755 (executable)
@@ -19,7 +19,7 @@ require_prog groff
 
 cd ${MH_INST_DIR}${mandir} || exit 1
 
-# groff will still exit with status zero even if warnings
+# groff will exit with zero status even if warnings
 # were emitted, so we have to jump through hoops to
 # find out if any were emitted.
 
@@ -31,20 +31,26 @@ actual=$MH_TEST_DIR/$$.actual
 rm -f "$expected" "$actual"
 touch "$expected" "$actual"
 
+
+warnings="-ww"
+
 #### 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
+[ $length -gt 32 ]  &&  warnings="${warnings} -Wbreak"
+
+#### OpenBSD's mandoc spits out a lot of "unbalance .el request" warnings;
+#### -Wel suppresses them.
+groff -Tutf8 -mandoc -ww man1/ali.1 >/dev/null 2>>"$actual"
+if grep warning "$actual" >/dev/null; then
+  warnings="$warnings -Wel"
+fi
+rm -f "$actual"
+touch "$actual"
 
-#### OpenBSD's mandoc spits out a lot of warnings.
-case `uname -s` in
-  OpenBSD) macpac=-man ;;
-  *)       macpac=-mandoc ;;
-esac
-warnings="-ww $suppress_break_warning"
 
 for manpage in man?/*.?; do
-  groff -Tutf8 $macpac $warnings "$manpage" >/dev/null 2>>"$actual"
+  groff -Tutf8 -mandoc $warnings "$manpage" >/dev/null 2>>"$actual"
 done
 
 check "$expected" "$actual"