()
| 598 | |
| 599 | #[test] |
| 600 | fn match_with_multiarg_keyword() { |
| 601 | let input = r#" |
| 602 | match user testuser |
| 603 | passwordauthentication yes |
| 604 | allowgroups administrators developers |
| 605 | "#; |
| 606 | let result: Map<String, Value> = parse_text_to_map(input).unwrap(); |
| 607 | let match_array = result.get("match").unwrap().as_array().unwrap(); |
| 608 | let match_obj = match_array[0].as_object().unwrap(); |
| 609 | let allowgroups = match_obj.get("allowgroups").unwrap().as_array().unwrap(); |
| 610 | assert_eq!(allowgroups.len(), 2); |
| 611 | assert_eq!(allowgroups[0], Value::String("administrators".to_string())); |
| 612 | assert_eq!(allowgroups[1], Value::String("developers".to_string())); |
| 613 | } |
| 614 | |
| 615 | #[test] |
| 616 | fn match_with_repeated_multiarg_keyword() { |
nothing calls this directly
no test coverage detected