MCPcopy Create free account
hub / github.com/PowerShell/DSC / match_with_comments

Function match_with_comments

resources/sshdconfig/src/parser.rs:657–668  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

655
656 #[test]
657 fn match_with_comments() {
658 let input = r#"
659match 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() {

Callers

nothing calls this directly

Calls 2

parse_text_to_mapFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected