Skip to content

Commit

Permalink
t/version: run man(1).
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk committed Apr 15, 2024
1 parent 88d8ec2 commit f3bd7d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
run: |
mv ubanner ubanner.bak
export LC_ALL=C.UTF-8
export MANPATH="$HOME/.local/share/man"
make test-installed verbose=1
mv ubanner.bak ubanner
Expand Down
11 changes: 9 additions & 2 deletions t/version.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ then
else
echo 'ok 3'
fi
line=$(grep '^[.]TH ' "$dir/doc/"*.1)
IFS=' "' read -r _ _ _ _ _ man_version _ <<< "$line"
if [[ $prog = ubanner ]]
then
man_target=$prog
else
man_target="$dir/doc/ubanner.1"
fi
echo "# man page target = $man_target"
line=$(MANWIDTH=80 man "$man_target" | tail -n 1)
IFS=' "' read -r _ man_version _ <<< "$line"
echo "# man page version = $man_version"
if [[ $man_version = $changelog_version ]]
then
Expand Down

0 comments on commit f3bd7d9

Please sign in to comment.