-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(tutorial): Ensure we actually test code
Biggest problem identified is that we are incorrectly setting the help usage in `04_04_custom`
- Loading branch information
Showing
16 changed files
with
102 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
```console | ||
$ 02_apps --help | ||
$ 02_apps_derive --help | ||
MyApp 1.0 | ||
Kevin K. <[email protected]> | ||
Does awesome things | ||
|
||
USAGE: | ||
02_apps[EXE] --two <VALUE> --one <VALUE> | ||
02_apps_derive[EXE] --two <TWO> --one <ONE> | ||
|
||
OPTIONS: | ||
-h, --help Print help information | ||
--one <VALUE> | ||
--two <VALUE> | ||
-V, --version Print version information | ||
-h, --help Print help information | ||
--one <ONE> | ||
--two <TWO> | ||
-V, --version Print version information | ||
|
||
$ 02_apps --version | ||
$ 02_apps_derive --version | ||
MyApp 1.0 | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
```console | ||
$ 02_crate --help | ||
$ 02_crate_derive --help | ||
clap [..] | ||
A simple to use, efficient, and full-featured Command Line Argument Parser | ||
|
||
USAGE: | ||
02_crate[EXE] --two <VALUE> --one <VALUE> | ||
02_crate_derive[EXE] --two <TWO> --one <ONE> | ||
|
||
OPTIONS: | ||
-h, --help Print help information | ||
--one <VALUE> | ||
--two <VALUE> | ||
-V, --version Print version information | ||
-h, --help Print help information | ||
--one <ONE> | ||
--two <TWO> | ||
-V, --version Print version information | ||
|
||
$ 02_crate --version | ||
$ 02_crate_derive --version | ||
clap [..] | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
```console | ||
$ 03_01_flag_bool --help | ||
$ 03_01_flag_bool_derive --help | ||
clap [..] | ||
A simple to use, efficient, and full-featured Command Line Argument Parser | ||
|
||
USAGE: | ||
03_01_flag_bool[EXE] [OPTIONS] | ||
03_01_flag_bool_derive[EXE] [OPTIONS] | ||
|
||
OPTIONS: | ||
-h, --help Print help information | ||
-v, --verbose | ||
-V, --version Print version information | ||
|
||
$ 03_01_flag_bool | ||
$ 03_01_flag_bool_derive | ||
verbose: false | ||
|
||
$ 03_01_flag_bool --verbose | ||
$ 03_01_flag_bool_derive --verbose | ||
verbose: true | ||
|
||
$ 03_01_flag_bool --verbose --verbose | ||
$ 03_01_flag_bool_derive --verbose --verbose | ||
verbose: true | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
```console | ||
$ 03_01_flag_count --help | ||
$ 03_01_flag_count_derive --help | ||
clap [..] | ||
A simple to use, efficient, and full-featured Command Line Argument Parser | ||
|
||
USAGE: | ||
03_01_flag_count[EXE] [OPTIONS] | ||
03_01_flag_count_derive[EXE] [OPTIONS] | ||
|
||
OPTIONS: | ||
-h, --help Print help information | ||
-v, --verbose | ||
-V, --version Print version information | ||
|
||
$ 03_01_flag_count | ||
$ 03_01_flag_count_derive | ||
verbose: 0 | ||
|
||
$ 03_01_flag_count --verbose | ||
$ 03_01_flag_count_derive --verbose | ||
verbose: 1 | ||
|
||
$ 03_01_flag_count --verbose --verbose | ||
$ 03_01_flag_count_derive --verbose --verbose | ||
verbose: 2 | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
```console | ||
$ 03_02_option --help | ||
$ 03_02_option_derive --help | ||
clap [..] | ||
A simple to use, efficient, and full-featured Command Line Argument Parser | ||
|
||
USAGE: | ||
03_02_option[EXE] [OPTIONS] | ||
03_02_option_derive[EXE] [OPTIONS] | ||
|
||
OPTIONS: | ||
-h, --help Print help information | ||
-n, --name <NAME> | ||
-V, --version Print version information | ||
|
||
$ 03_02_option | ||
$ 03_02_option_derive | ||
name: None | ||
|
||
$ 03_02_option --name bob | ||
$ 03_02_option_derive --name bob | ||
name: Some("bob") | ||
|
||
$ 03_02_option --name=bob | ||
$ 03_02_option_derive --name=bob | ||
name: Some("bob") | ||
|
||
$ 03_02_option -n bob | ||
$ 03_02_option_derive -n bob | ||
name: Some("bob") | ||
|
||
$ 03_02_option -n=bob | ||
$ 03_02_option_derive -n=bob | ||
name: Some("bob") | ||
|
||
$ 03_02_option -nbob | ||
$ 03_02_option_derive -nbob | ||
name: Some("bob") | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.