Revert "test: remove manpage test"

I root caused the issue with this test (fixed in the next commit).

This reverts commit 4faee3855f.
This commit is contained in:
Patrick McCarty
2018-08-17 14:18:35 -07:00
committed by Matthew Johnson
parent 9d68762ba4
commit 7fa6cd4562
2 changed files with 30 additions and 0 deletions
+1
View File
@@ -111,6 +111,7 @@ BATS_LOG_DRIVER = $(tap_driver)
TESTS = $(dist_check_SCRIPTS)
BATS = \
test/documentation/manpages/test.bats \
test/functional/bundleadd/add-directory/test.bats \
test/functional/bundleadd_v2/add-directory.bats \
test/functional/bundleadd/add-existing/test.bats \
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bats
setup() {
# Ensure that we have the conversion program
type -t rst2man.py > /dev/null
# Change to the toplevel git directory
type -t git >/dev/null || skip
cd "$(git rev-parse --show-toplevel)"
}
@test "Check manual pages are up to date" {
for rst in docs/*.[1-9].rst
do
[ -f "$rst" ] || continue # Could use shopt -s nullglob
echo "$rst"
rst2man.py "$rst" | cmp "${rst%.rst}" -
done
}
@test "Check manual pages are clean" {
for nroff in docs/*.[1-9]
do
[ -f "$nroff" ] || continue
echo "$nroff"
git diff-index --quiet HEAD "$nroff"
done
}
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80