]> diplodocus.org Git - nmh/blobdiff - test/manpages/test-manpages
groff -man silence the test-manpages warnings. One more try: -Wel.
[nmh] / test / manpages / test-manpages
index fb86c739dcfb8ea37e2de728cce4efe26a736d3c..8ad63371d5094da20b0149bda3f19903b44325d1 100755 (executable)
@@ -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