Improve help, and copy it to the README.

This commit is contained in:
Valentin Lorentz 2015-12-24 12:07:40 +01:00
parent eb46c39723
commit 60bd8a04f7
2 changed files with 27 additions and 2 deletions

View File

@ -82,6 +82,30 @@ make install
python3 -m irctest irctest.controllers.charybdis python3 -m irctest irctest.controllers.charybdis
``` ```
## Full help
```
usage: python3 -m irctest [-h] [--show-io] [-v] [-s SPECIFICATION] [-l] module
positional arguments:
module The module used to run the tested program.
optional arguments:
-h, --help show this help message and exit
--show-io Show input/outputs with the tested program.
-v, --verbose Verbosity. Give this option multiple times to make it
even more verbose.
-s SPECIFICATION, --specification SPECIFICATION
The set of specifications to test the program with.
Valid values: RFC1459, RFC2812, IRCv3.1, IRCv3.2. Use
this option multiple times to test with multiple
specifications. If it is not given, defaults to all.
-l, --loose Disables strict checks of conformity to the
specification. Strict means the specification is
unclear, and the most restrictive interpretation is
choosen.
```
## What `irctest` is not ## What `irctest` is not
A formal proof that a given software follows any of the IRC specification, A formal proof that a given software follows any of the IRC specification,

View File

@ -62,13 +62,14 @@ parser.add_argument('module', type=str,
parser.add_argument('--show-io', action='store_true', parser.add_argument('--show-io', action='store_true',
help='Show input/outputs with the tested program.') help='Show input/outputs with the tested program.')
parser.add_argument('-v', '--verbose', action='count', default=1, parser.add_argument('-v', '--verbose', action='count', default=1,
help='Verbosity.') help='Verbosity. Give this option multiple times to make '
'it even more verbose.')
parser.add_argument('-s', '--specification', type=str, action='append', parser.add_argument('-s', '--specification', type=str, action='append',
help=('The set of specifications to test the program with. ' help=('The set of specifications to test the program with. '
'Valid values: {}. ' 'Valid values: {}. '
'Use this option multiple times to test with multiple ' 'Use this option multiple times to test with multiple '
'specifications. If it is not given, defaults to all.') 'specifications. If it is not given, defaults to all.')
.format(list(map(str, Specifications)))) .format(', '.join(x.value for x in Specifications)))
parser.add_argument('-l', '--loose', action='store_true', parser.add_argument('-l', '--loose', action='store_true',
help='Disables strict checks of conformity to the specification. ' help='Disables strict checks of conformity to the specification. '
'Strict means the specification is unclear, and the most restrictive ' 'Strict means the specification is unclear, and the most restrictive '