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