1 use structopt::StructOpt; 2 3 #[test] raw_idents()4fn 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 } 18