Commando
|
Commando |
18 |
#constructor()
|
Commando#constructor |
5 |
can be created with no config
|
- |
|
can be created with name
|
- |
|
can be created with name config
|
- |
|
can be created with version config
|
- |
|
has immutable version
|
- |
|
#command()
|
Commando#command |
2 |
rejects unnamed commands
|
- |
|
can add a command
|
- |
|
#getCommand()
|
Commando#getCommand |
1 |
gets the command
|
- |
|
Multi command
|
Commando#command |
3 |
should fail if invoked without command
|
- |
|
should fail if invoked without subcommand
|
- |
|
should run if invoked with subcommand
|
- |
|
#args()
|
Commando#args |
4 |
sees arguments
|
- |
|
passes args to subcommands
|
- |
|
ignores undefined options
|
- |
|
sees options
|
- |
|
#getOptionsHash
|
- |
3 |
returns empty object for no options
|
- |
|
returns default options
|
- |
|
returns default and overriden options
|
- |
|
Action
|
Commando#action |
10 |
simple command with one action
|
- |
7 |
calls the action without calling args
|
- |
|
calls the action with null args
|
- |
|
calls the action with empty args
|
- |
|
calls the action with one argument
|
- |
|
calls the action with one short option
|
- |
|
calls the action with one long option
|
- |
|
calls the action with many options
|
- |
|
Subcommand
|
- |
3 |
calls command action if no subcommand given
|
- |
|
calls command action if unknown subcommand given
|
- |
|
calls sub command action if subcommand given
|
- |
|
Option
|
Option |
14 |
#parseOptString()
|
Option#parseOptString |
10 |
Parses short options
|
- |
|
Parses long options
|
- |
|
Parses short and long options
|
- |
|
Parses short optional arguments
|
- |
|
Parses short required arguments
|
- |
|
Parses long optional arguments
|
- |
|
Parses long required arguments
|
- |
|
Parses short and long with optional arguments
|
- |
|
Parses short and long with required arguments
|
- |
|
fails on duplicated values
|
- |
|
#constructor()
|
Option#constructor |
4 |
creates short flags
|
- |
|
creates long flags
|
- |
|
creates options with optional values
|
- |
|
creates options with required values
|
- |
|
Argument Parsing
|
Option |
12 |
sees defaults
|
- |
|
sees long flags
|
- |
|
sees long args
|
- |
|
Short args
|
- |
3 |
sees defaults
|
- |
|
sees short flags
|
- |
|
sees short args
|
- |
|
Long args
|
- |
Combined args
|
- |
Named args
|
- |
Subcommand args
|
- |
3 |
sees defaults
|
- |
|
sees short flags
|
- |
|
sees short args
|
- |
|
Required arguments
|
- |
1 |
validates required arguments
|
- |
|
Action arguments
|
- |
2 |
passes the root command to the root action
|
- |
|
passes the sub command to the sub action
|
- |
|