]> diplodocus.org Git - nmh/blobdiff - test/manpages/test-manpages
Try using -man instead of -mandoc in test-manpages on OpenBSD
[nmh] / test / manpages / test-manpages
index ce7d44381c26e5637d496b22637c8bf98a880717..570ff33543a4b12f25557c6138f3b63294440f6d 100755 (executable)
@@ -31,8 +31,20 @@ actual=$MH_TEST_DIR/$$.actual
 rm -f "$expected" "$actual"
 touch "$expected" "$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) macpac=-man ;;
+  *)       macpac=-mandoc ;;
+esac
+warnings="-ww $suppress_break_warning"
+
 for manpage in man?/*.?; do
 for manpage in man?/*.?; do
-  groff -Tutf8 -mandoc -ww "$manpage" > /dev/null 2>>"$actual"
+  groff -Tutf8 $macpac $warnings "$manpage" >/dev/null 2>>"$actual"
 done
 
 check "$expected" "$actual"
 done
 
 check "$expected" "$actual"