blob: c00ff669d9731f5b4b0991df4be06a02d186377c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use structopt::StructOpt;
#[test]
fn raw_idents() {
#[derive(StructOpt, Debug, PartialEq)]
struct Opt {
#[structopt(short, long)]
r#type: Vec<String>,
}
assert_eq!(
Opt {
r#type: vec!["long".into(), "short".into()]
},
Opt::from_iter(&["test", "--type", "long", "-t", "short"])
);
}
|