2015-08-27 21:03:45 +00:00
|
|
|
extern crate clap;
|
|
|
|
|
|
|
|
use clap::{App, Arg};
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
#[should_panic]
|
|
|
|
fn unique_arg_names() {
|
2017-02-21 04:51:20 +00:00
|
|
|
App::new("some").args(&[Arg::with_name("arg").short("a"), Arg::with_name("arg").short("b")]);
|
2015-08-27 21:03:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
#[should_panic]
|
|
|
|
fn unique_arg_shorts() {
|
2017-02-21 04:51:20 +00:00
|
|
|
App::new("some").args(&[Arg::with_name("arg1").short("a"), Arg::with_name("arg2").short("a")]);
|
2015-08-27 21:03:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
#[should_panic]
|
|
|
|
fn unique_arg_longs() {
|
2017-02-21 04:51:20 +00:00
|
|
|
App::new("some")
|
|
|
|
.args(&[Arg::with_name("arg1").long("long"), Arg::with_name("arg2").long("long")]);
|
2016-01-21 06:48:30 +00:00
|
|
|
}
|