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

Function test_registry_value_present

archive/registry/src/regconfighelper.rs:374–386  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372
373#[test]
374fn test_registry_value_present() {
375 let input_json: &str = r#"
376 {
377 "keyPath": "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion",
378 "valueName": "ProgramFilesPath",
379 "_exist": true
380 }
381 "#;
382
383 let config: Registry = serde_json::from_str(input_json).unwrap();
384 let json = config_test(&config).unwrap();
385 assert_eq!(json, r#"{"$id":"https://developer.microsoft.com/json-schemas/windows/registry/20230303/Microsoft.Windows.Registry.schema.json","keyPath":"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion","valueName":"ProgramFilesPath","valueData":{"ExpandString":"%ProgramFiles%"},"_exist":true,"_inDesiredState":true}"#);
386}
387
388#[test]
389fn test_registry_value_absent() {

Callers

nothing calls this directly

Calls 2

config_testFunction · 0.70
from_strFunction · 0.50

Tested by

no test coverage detected