clap/tests
ncaq fc359e3c46 fixed: failed of multiple_occurrences with env (#1609)
The example code.

~~~rust
use clap::{App, Arg};

fn main() {
  let matches = App::new("My Super Program")
    .arg(
      Arg::with_name("verbose")
        .help("Sets the level of verbosity")
        .short('v')
        .long("verbose")
        .takes_value(false)
        .multiple_occurrences(true)
        .env("VERBOSE"),
    )
    .get_matches();

  match matches.occurrences_of("verbose") {
    0 => println!("0 No verbose info"),
    1 => println!("1 Some verbose info"),
    2 => println!("2 Tons of verbose info"),
    3 | _ => println!("3 >= Don't be crazy"),
  }
}
~~~

It code use multiple_occurrences with env.
But it do not work.
`env` method set require take value.

It result see under.

~~~console
% cargo run -- -v
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/foo -v`
error: The argument '--verbose <verbose>...' requires a value but none was supplied

USAGE:
    foo [OPTIONS]

For more information try --help
~~~

And, structopt or clap_derive may be create similar code.
So I am confused by structopt.

This to fix code small.
2019-12-22 23:03:23 +05:30
..
app.yml Fix compiling with "--features yaml" 2019-06-19 16:32:52 -07:00
app_2space.yml Fix compiling with "--features yaml" 2019-06-19 16:32:52 -07:00
app_settings.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
arg_aliases.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
borrowed.rs style: cargo fmt run 2018-11-14 12:05:06 -05:00
conflicts.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
default_vals.rs Provide default_values mimicking default_value 2019-10-29 21:48:10 -04:00
delimiters.rs refactor(Arg): changes Arg::short to accept a char instead of &str 2018-07-23 15:10:12 -04:00
derive_order.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
env.rs style: cargo fmt run 2018-11-14 12:05:06 -05: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: remove code going to other crates and deprecations 2018-10-19 23:31:06 -04:00
global_args.rs refactor: removed strings as an internal ID for arguments, groups, and 2019-04-05 20:21:22 -04:00
groups.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
help.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
hidden_args.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
indices.rs style: rustfmt run 2018-08-01 23:13:51 -04:00
macros.rs add subcommand expr macro 2019-10-30 00:22:05 -04:00
multiple_occurrences.rs fixed: failed of multiple_occurrences with env (#1609) 2019-12-22 23:03:23 +05:30
multiple_values.rs Fixup tests 2019-06-25 19:02:53 -04:00
opts.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
positionals.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
posix_compatible.rs style: rustfmt run 2019-04-05 20:21:33 -04:00
possible_values.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
propagate_globals.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
require.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
subcommands.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
template_help.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
tests.rs Fix some clippy lints 2019-10-29 21:46:25 -04:00
unique_args.rs Fixup tests 2019-06-25 19:02:53 -04:00
utf8.rs refactor: remove code going to other crates and deprecations 2018-10-19 23:31:06 -04:00
version-numbers.rs docs: add html_root_url attribute 2017-09-23 12:50:21 +02:00
version.rs Don't write --version output directly to stdout. (#1602) 2019-11-26 18:39:12 +01:00
yaml.rs Fix compiling with "--features yaml" 2019-06-19 16:32:52 -07:00