@@ -16,13 +16,14 @@ Describe 'registry config whatif tests' {
16
16
"keyPath": "HKCU\\1\\2\\3"
17
17
}
18
18
'@
19
+ registry config set - w -- input $json | Write-Host
19
20
$get_before = registry config get -- input $json
20
21
$result = registry config set - w -- input $json | ConvertFrom-Json
21
22
$LASTEXITCODE | Should - Be 0
22
23
$result.keyPath | Should - Be ' HKCU\1\2\3'
23
- $result.metadata .whatIf [0 ] | Should -Match ' .*1.*'
24
- $result.metadata .whatIf [1 ] | Should -Match ' .*2.*'
25
- $result.metadata .whatIf [2 ] | Should -Match ' .*3.*'
24
+ $result._metadata .whatIf [0 ] | Should -Match ' .*1.*'
25
+ $result._metadata .whatIf [1 ] | Should -Match ' .*2.*'
26
+ $result._metadata .whatIf [2 ] | Should -Match ' .*3.*'
26
27
$get_after = registry config get -- input $json
27
28
$get_before | Should -EQ $get_after
28
29
}
@@ -42,9 +43,9 @@ Describe 'registry config whatif tests' {
42
43
$result.keyPath | Should - Be ' HKCU\1\2\3'
43
44
$result.valueName | Should - Be ' Hello'
44
45
$result.valueData.String | Should - Be ' World'
45
- $result.metadata .whatIf [0 ] | Should -Match ' .*1.*'
46
- $result.metadata .whatIf [1 ] | Should -Match ' .*2.*'
47
- $result.metadata .whatIf [2 ] | Should -Match ' .*3.*'
46
+ $result._metadata .whatIf [0 ] | Should -Match ' .*1.*'
47
+ $result._metadata .whatIf [1 ] | Should -Match ' .*2.*'
48
+ $result._metadata .whatIf [2 ] | Should -Match ' .*3.*'
48
49
}
49
50
50
51
It ' Can whatif an existing key with new value' - Skip:(! $IsWindows ) {
0 commit comments