()
| 655 | |
| 656 | #[test] |
| 657 | fn match_with_comments() { |
| 658 | let input = r#" |
| 659 | match user developer |
| 660 | # Enable password authentication for developers - comment ignored |
| 661 | passwordauthentication yes |
| 662 | "#; |
| 663 | let result: Map<String, Value> = parse_text_to_map(input).unwrap(); |
| 664 | let match_array = result.get("match").unwrap().as_array().unwrap(); |
| 665 | let match_obj = match_array[0].as_object().unwrap(); |
| 666 | assert_eq!(match_obj.get("passwordauthentication").unwrap(), &Value::Bool(true)); |
| 667 | assert_eq!(match_obj.len(), 2); |
| 668 | } |
| 669 | |
| 670 | #[test] |
| 671 | fn match_with_multiple_criteria_types() { |
nothing calls this directly
no test coverage detected