Add a selftest that checks documentation invariants.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 31 Jul 2019 20:44:13 +0000 (22:44 +0200)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 6 Aug 2019 22:05:34 +0000 (00:05 +0200)
commitd2834edcb67b9d9bd7163868fa0239948a2e57b7
tree1117bcdfcb60eeb897f5a9711b27c207b29536a6
parent590042fc45f857c981bee4e0c76f6b3b528a224e
Add a selftest that checks documentation invariants.

Several approaches were discussed (mail or irc) to verify the invariants of
the GDB help documentation : checking with apropos ., modifying add_cmd
to do the check and output a warning, implement maintenance check-doc.

A selftest was finally chosen as:
  * this can be run on demand, including by users if they want
    to check user defined commands.
  * it does not interact with the normal behaviour of apropos, define,
    python, ...
    (such as output warnings when a user defines a command help that
     does not respect the doc).
  * when the selftest runs, it checks the user defined and python
    defined commands currently defined.

gdb/ChangeLog
* unittests/help-doc-selftests.c: New file.
* Makefile.in: Add the new file.
gdb/ChangeLog
gdb/Makefile.in
gdb/unittests/help-doc-selftests.c [new file with mode: 0644]