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

Function test_set_value_expandstring

archive/ntreg/tests/registry_value_tests.rs:66–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65#[test]
66fn test_set_value_expandstring() {
67 let key = RegistryKey::new("HKCU");
68 assert!(key.is_ok());
69 let new_key = key.unwrap().create_or_get_key("TestKey_expandstring");
70 assert!(new_key.is_ok());
71 let new_key = new_key.unwrap();
72 let reg_value = RegistryValueData::ExpandString("%PATH%;TestExpandStringValue".to_string());
73 let result = new_key.set_value("TestExpandString", &reg_value);
74 assert!(result.is_ok());
75 let result = result.unwrap();
76 assert_eq!(result.name, "TestExpandString".to_string());
77 assert_eq!(result.data, RegistryValueData::ExpandString("%PATH%;TestExpandStringValue".to_string()));
78 assert!(new_key.delete(false).is_ok());
79}
80
81#[test]
82fn test_set_value_dword() {

Callers

nothing calls this directly

Calls 3

create_or_get_keyMethod · 0.80
set_valueMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected