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

Function keyword_with_operator_variations

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

Source from the content-addressed store, hash-verified

504
505 #[test]
506 fn keyword_with_operator_variations() {
507 let input = r#"
508ciphers +aes256-ctr
509macs -hmac-md5
510kexalgorithms ^ecdh-sha2-nistp256
511"#;
512 let result: Map<String, Value> = parse_text_to_map(input).unwrap();
513
514 let ciphers = result.get("ciphers").unwrap().as_object().unwrap();
515 assert_eq!(ciphers.get("operator").unwrap(), &Value::String("+".to_string()));
516 assert!(ciphers.get("value").unwrap().is_array());
517
518 let macs = result.get("macs").unwrap().as_object().unwrap();
519 assert_eq!(macs.get("operator").unwrap(), &Value::String("-".to_string()));
520 assert!(macs.get("value").unwrap().is_array());
521
522 let kex = result.get("kexalgorithms").unwrap().as_object().unwrap();
523 assert_eq!(kex.get("operator").unwrap(), &Value::String("^".to_string()));
524 assert!(kex.get("value").unwrap().is_array());
525 }
526
527 #[test]
528 fn keyword_with_operator_multiple_values() {

Callers

nothing calls this directly

Calls 2

parse_text_to_mapFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected