()
| 582 | |
| 583 | #[test] |
| 584 | fn match_with_comma_separated_criteria() { |
| 585 | let input = r#" |
| 586 | match user alice,bob |
| 587 | passwordauthentication yes |
| 588 | "#; |
| 589 | let result: Map<String, Value> = parse_text_to_map(input).unwrap(); |
| 590 | let match_array = result.get("match").unwrap().as_array().unwrap(); |
| 591 | let match_obj = match_array[0].as_object().unwrap(); |
| 592 | let criteria = match_obj.get("criteria").unwrap().as_object().unwrap(); |
| 593 | let user_array = criteria.get("user").unwrap().as_array().unwrap(); |
| 594 | assert_eq!(user_array.len(), 2); |
| 595 | assert_eq!(user_array[0], Value::String("alice".to_string())); |
| 596 | assert_eq!(user_array[1], Value::String("bob".to_string())); |
| 597 | } |
| 598 | |
| 599 | #[test] |
| 600 | fn match_with_multiarg_keyword() { |
nothing calls this directly
no test coverage detected