V:\workspaces\python-gitlab\demo>test_help.cmd demo_argparse

V:\workspaces\python-gitlab\demo>REM Help

V:\workspaces\python-gitlab\demo>demo_argparse.py -h
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...

optional arguments:
  -h, --help   show this help message and exit
  -v           Verbose mode
  -d           Debug mode

Objects:
  {cmd1,cmd2}  Objects to manipulate.
    cmd1       cmd1 help
    cmd2       cmd2 help

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 -h
usage: demo_argparse.py cmd1 [-h] {act1a,act1b} ...

optional arguments:
  -h, --help     show this help message and exit

Actions:
  {act1a,act1b}  Actions to execute.
    act1a        act1a help
    act1b        act1b help

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 act1a -h
usage: demo_argparse.py cmd1 act1a [-h] [--greeting GREETING] [--caps]

optional arguments:
  -h, --help           show this help message and exit
  --greeting GREETING  word to use for the greeting
  --caps               uppercase the output

V:\workspaces\python-gitlab\demo>REM Help on wrong args

V:\workspaces\python-gitlab\demo>demo_argparse.py x -h
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...
demo_argparse.py: error: argument obj: invalid choice: 'x' (choose from 'cmd1', 'cmd2')

V:\workspaces\python-gitlab\demo>demo_argparse.py  -a -h
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...

optional arguments:
  -h, --help   show this help message and exit
  -v           Verbose mode
  -d           Debug mode

Objects:
  {cmd1,cmd2}  Objects to manipulate.
    cmd1       cmd1 help
    cmd2       cmd2 help

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 x -h
usage: demo_argparse.py cmd1 [-h] {act1a,act1b} ...
demo_argparse.py cmd1: error: argument act: invalid choice: 'x' (choose from 'act1a', 'act1b')

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 -a -h
usage: demo_argparse.py cmd1 [-h] {act1a,act1b} ...

optional arguments:
  -h, --help     show this help message and exit

Actions:
  {act1a,act1b}  Actions to execute.
    act1a        act1a help
    act1b        act1b help

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 act1a x -h
usage: demo_argparse.py cmd1 act1a [-h] [--greeting GREETING] [--caps]

optional arguments:
  -h, --help           show this help message and exit
  --greeting GREETING  word to use for the greeting
  --caps               uppercase the output

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 act1a -a -h
usage: demo_argparse.py cmd1 act1a [-h] [--greeting GREETING] [--caps]

optional arguments:
  -h, --help           show this help message and exit
  --greeting GREETING  word to use for the greeting
  --caps               uppercase the output

V:\workspaces\python-gitlab\demo>REM Missing args

V:\workspaces\python-gitlab\demo>demo_argparse.py
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...
demo_argparse.py: error: too few arguments

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1
usage: demo_argparse.py cmd1 [-h] {act1a,act1b} ...
demo_argparse.py cmd1: error: too few arguments

V:\workspaces\python-gitlab\demo>REM Wrong args

V:\workspaces\python-gitlab\demo>demo_argparse.py x
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...
demo_argparse.py: error: argument obj: invalid choice: 'x' (choose from 'cmd1', 'cmd2')

V:\workspaces\python-gitlab\demo>demo_argparse.py  -a
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...
demo_argparse.py: error: too few arguments

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 x
usage: demo_argparse.py cmd1 [-h] {act1a,act1b} ...
demo_argparse.py cmd1: error: argument act: invalid choice: 'x' (choose from 'act1a', 'act1b')

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 -a
usage: demo_argparse.py cmd1 [-h] {act1a,act1b} ...
demo_argparse.py cmd1: error: too few arguments

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 act1a x
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...
demo_argparse.py: error: unrecognized arguments: x

V:\workspaces\python-gitlab\demo>demo_argparse.py cmd1 act1a -a
usage: demo_argparse.py [-h] [-v] [-d] {cmd1,cmd2} ...
demo_argparse.py: error: unrecognized arguments: -a
