()
| 155 | |
| 156 | #[test] |
| 157 | fn test_parse_from_args_whitelist_ok() { |
| 158 | let options = Options::parse_from_args(&[ |
| 159 | "-k".to_owned(), |
| 160 | "deadlock".to_owned(), |
| 161 | "-l".to_owned(), |
| 162 | "cc,tokio_util,indicatif".to_owned(), |
| 163 | ]) |
| 164 | .unwrap(); |
| 165 | assert!(matches!(options.detector_kind, DetectorKind::Deadlock)); |
| 166 | assert!( |
| 167 | matches!(options.crate_name_list, CrateNameList::White(v) if v == vec!["cc".to_owned(), "tokio_util".to_owned(), "indicatif".to_owned()]) |
| 168 | ); |
| 169 | } |
| 170 | |
| 171 | #[test] |
| 172 | fn test_parse_from_args_err() { |
nothing calls this directly
no outgoing calls
no test coverage detected