summaryrefslogtreecommitdiff
path: root/tests/tests/manpages-format
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests/manpages-format')
-rwxr-xr-xtests/tests/manpages-format23
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/tests/manpages-format b/tests/tests/manpages-format
index 4b9585f..79eda75 100755
--- a/tests/tests/manpages-format
+++ b/tests/tests/manpages-format
@@ -23,11 +23,13 @@ run_man () {
}
for roff in $manpages; do
- >$tmp/$roff.expected
+ for fmt in txt; do
+ >$tmp/$roff.$fmt-expected
+ done
done
expected () {
- cat >$tmp/$1.expected
+ cat >$tmp/$2.$1-expected
}
not_egrep_vxPf () {
@@ -44,18 +46,27 @@ not_egrep_vxPf () {
' "$@"
}
-expected dgit.1 <<'END'
+expected txt dgit.1 <<'END'
.* # table wider than line width
END
+prep () {
+ fmt=$1
+ errs=$tmp/$roff.$fmt-errs
+}
+
+check () {
+ perl -0777 -i~ -pe 's/\n[ \t]+/ # /' $errs
+ not_egrep_vxPf $tmp/$roff.$fmt-expected $errs
+}
+
for roff in $manpages; do
section=${roff##*.}
page=${roff%.*}
- errs=$tmp/$roff.errs
+ prep txt
run_man >/dev/null
- perl -0777 -i~ -pe 's/\n[ \t]+/ # /' $errs
- not_egrep_vxPf $tmp/$roff.expected $errs
+ check
done
t-ok