diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-28 15:46:06 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-30 23:25:45 +0100 |
commit | 9f89aa601dc0ca0ea4387ce3cd9e1304770577e3 (patch) | |
tree | 60a942e9cb04136c7a31edb257baba4bda60717c /tests/tests/manpages-format | |
parent | 1066c6442bc1471d440ac86711250d825b5ddc2c (diff) |
test suite: manpages-format: Prep for other formats (nfc)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/manpages-format')
-rwxr-xr-x | tests/tests/manpages-format | 23 |
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 |