clap/tests
Kevin K 80993357e1
api: Adds Arg::case_insensitive(bool) which allows matching Arg::possible_values without worrying about ASCII case
When used with `Arg::possible_values` it allows the argument value to pass validation even if
the case differs from that of the specified `possible_value`.

```rust
let m = App::new("pv")
    .arg(Arg::with_name("option")
        .long("--option")
        .takes_value(true)
        .possible_value("test123")
        .case_insensitive(true))
    .get_matches_from(vec![
        "pv", "--option", "TeSt123",
    ]);

assert!(m.value_of("option").unwrap().eq_ignore_ascii_case("test123"));
```

This setting also works when multiple values can be defined:

```rust
let m = App::new("pv")
    .arg(Arg::with_name("option")
        .short("-o")
        .long("--option")
        .takes_value(true)
        .possible_value("test123")
        .possible_value("test321")
        .multiple(true)
        .case_insensitive(true))
    .get_matches_from(vec![
        "pv", "--option", "TeSt123", "teST123", "tESt321"
    ]);

let matched_vals = m.values_of("option").unwrap().collect::<Vec<_>>();
assert_eq!(&*matched_vals, &["TeSt123", "teST123", "tESt321"]);
```

Closes #1118
2017-11-28 08:57:04 -05:00
..
app.yml Support loading help_message and version_message from the YAML 2017-03-10 01:54:50 -05:00
app_settings.rs imp: adds '[SUBCOMMAND]' to usage strings with only AppSettings::AllowExternalSubcommands is used with no other subcommands 2017-11-06 20:15:07 -05:00
arg_aliases.rs tests: massively rehauls tests for better debugging and vastly improved error messages/deduplication 2017-01-02 23:05:50 -05:00
borrowed.rs tests: adds tests to ensure borrowed args don't break 2017-02-28 08:30:14 -05:00
completions.rs fix: escape special characters in zsh and fish completions 2017-09-12 18:27:29 +03:00
conflicts.rs tests: adds tests to make sure args with default values can have conflicts 2017-10-24 12:23:29 -07:00
default_vals.rs tests: adds tests to ensure number_of_values and default_value can be used together 2017-10-24 12:57:04 -07:00
delimiters.rs fix: fixes a bug where flags were parsed as flags AND positional values when specific combinations of settings were used 2017-05-07 10:46:03 -04:00
derive_order.rs tests: massively rehauls tests for better debugging and vastly improved error messages/deduplication 2017-01-02 23:05:50 -05:00
env.rs add validation tests 2017-10-05 11:36:50 -07:00
example1_tmpl_full.txt feat(HELP): Add a Templated Help system. 2016-04-13 07:06:23 -03:00
example1_tmpl_simple.txt feat(HELP): Add a Templated Help system. 2016-04-13 07:06:23 -03:00
flags.rs refactor(Arg): removes duplicate and uses Base, Switched, and Valued internally now 2017-02-20 19:06:36 -05:00
global_args.rs tests: adds tests to protect against panics when using globals and calling App::get_matches_from_safe_borrow multiple times 2017-10-24 10:46:00 -04:00
groups.rs tests: adds a test where a non-existing arg is added to a group to ensure a failed debug assertion 2017-05-16 07:23:22 -04:00
help.rs tests: adds tests to guard against --help and -h being overridable 2017-11-22 04:11:28 -05:00
hidden_args.rs tests: fixes failing hidden args test 2017-03-10 08:24:30 -05:00
macros.rs refactor: removes unused imports on nightly via cfg directive 2017-11-06 20:11:19 -05:00
multiple_occurrences.rs tests: massively rehauls tests for better debugging and vastly improved error messages/deduplication 2017-01-02 23:05:50 -05:00
multiple_values.rs tests: adds tests to make sure args are preferred over matching subcommands when values are possible 2017-10-24 14:59:31 -07:00
opts.rs tests: adds tests to guard aginst issue 1105 and empty values in options 2017-11-13 17:05:28 -05:00
positionals.rs tests: adds tests to ensure flags not incorrectly parsed as positionals 2017-05-07 10:46:03 -04:00
posix_compatible.rs tests: adds tests for different value delimiters 2016-01-28 11:45:31 -05:00
possible_values.rs api: Adds Arg::case_insensitive(bool) which allows matching Arg::possible_values without worrying about ASCII case 2017-11-28 08:57:04 -05:00
propagate_globals.rs tests: refactors the tests for propagating global values and flags as well as adds some tests for default values and flags 2017-10-23 21:27:29 -04:00
require.rs tests: adds tests for reqire_equals(true) errors and help 2017-03-16 21:45:45 -04:00
subcommands.rs tests: adds tests to make sure args are preferred over matching subcommands when values are possible 2017-10-24 14:59:31 -07:00
template_help.rs tests: massively rehauls tests for better debugging and vastly improved error messages/deduplication 2017-01-02 23:05:50 -05:00
tests.rs tests: updates tests new global values being propagated up and down 2017-10-23 22:14:16 -04:00
unique_args.rs perf: refactor to remove unneeded vectors and allocations and checks for significant performance increases 2017-02-28 08:30:13 -05:00
utf8.rs chore: fixes doc and style mistakes 2016-01-28 21:58:40 -05:00
version-numbers.rs docs: add html_root_url attribute 2017-09-23 12:50:21 +02:00
version.rs tests: adds tests to verify help and version can be properly overridden 2017-04-04 19:56:34 -04:00
yaml.rs fix(yaml): adds support for loading author info from yaml 2017-03-22 20:23:55 -04:00