Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Testing man pages

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

When the commands provided by the koha-common Debian package are changed, the man pages for those commands should be changed too. They are maintained as DocBook-files in the debian/docs/ directory. Here are a couple of things that should be done to test changes to these files.

View as man page

This will create a file called koha-somecommand.8 in the directory you are in when you run the command:

 xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl debian/docs/koha-somecommand.xml

To view the file you just created:

 man -l koha-somecommand.8

What you see should be a well formed man page, documenting all available options for the command in question etc.

Remember to remove koha-somecommand.8 when you are done.

Run relevant tests

Currently there is one test that checks the syntax of the DocBook files:

 prove -v xt/verify-debian-docbook.t

All tests should pass, of course.

Hints in commit messages

Patches for man pages can contain instructions similar to this:

To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-mysql.xml
$ man -l koha-mysql.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t