This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
help tests
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 1 Nov 2006 22:23:58 +0300
- Subject: help tests
I'm updating the help.exp testcase for the recently committed changes in help
output, and I'm starting to wonder if all of those help tests are useful. For
each command the following is tested:
- The extact help for the command proper
- The exact list of subcommands -- for prefix commands and command classes.
- The epilogue that contains things like:
Command name abbreviations are allowed if unambiguous
I think it's important to test that "help whatever" produces output, and also
test some general structure -- like presence of that epilogue.
On the other hand, I'm not sure that testing for the exact list of subcommands
is desired. It's not something that can be accidentally broken -- subcommands
don't get added as side effect of some other change -- they can only appear
if added explicitly. I also don't think that testing for exact help test for
the command itself does not make sense -- the help is verbatim string in
sources -- it can't be accidentally broken and I don't think tests should
protect against somebody modifying random characters in help strings.
What I think must be tested is that:
1. For every command, class, or prefix command, there's some
docs.
2. For classes and prefix commands, help output has the list of
commands in that class or list of subcommands. But the exact
list of commands should not be tested.
3. There's some epilogue, which is appropriate to the type of
entity we asked help for.
Thoughts? If everybody is fine with it I'll adjust help.exp.
- Volodya