diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-11-01 17:08:51 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-11-01 18:35:01 -0600 |
| commit | d70b0710ba8ae05a5018ce96967f1cf7a7f717f5 (patch) | |
| tree | 95f6d0fadaa7ab93e0c3265fd4c766d89f0dc080 /src/test/BurnUnitTest/SearchTest.cpp | |
| parent | 352aefb0ac67ffbf74cd126db710031d4944fe89 (diff) | |
| download | wix-d70b0710ba8ae05a5018ce96967f1cf7a7f717f5.tar.gz wix-d70b0710ba8ae05a5018ce96967f1cf7a7f717f5.tar.bz2 wix-d70b0710ba8ae05a5018ce96967f1cf7a7f717f5.zip | |
WIXFEAT:5355 - Don't clear variable for missing key or value.
Diffstat (limited to 'src/test/BurnUnitTest/SearchTest.cpp')
| -rw-r--r-- | src/test/BurnUnitTest/SearchTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/BurnUnitTest/SearchTest.cpp b/src/test/BurnUnitTest/SearchTest.cpp index d868190d..eca01f5f 100644 --- a/src/test/BurnUnitTest/SearchTest.cpp +++ b/src/test/BurnUnitTest/SearchTest.cpp | |||
| @@ -198,6 +198,8 @@ namespace Bootstrapper | |||
| 198 | 198 | ||
| 199 | VariableSetStringHelper(&variables, L"MyKey", L"SOFTWARE\\Microsoft\\WiX_Burn_UnitTest\\Value", FALSE); | 199 | VariableSetStringHelper(&variables, L"MyKey", L"SOFTWARE\\Microsoft\\WiX_Burn_UnitTest\\Value", FALSE); |
| 200 | VariableSetStringHelper(&variables, L"MyValue", L"String", FALSE); | 200 | VariableSetStringHelper(&variables, L"MyValue", L"String", FALSE); |
| 201 | VariableSetStringHelper(&variables, L"Variable27", L"Default27", FALSE); | ||
| 202 | VariableSetStringHelper(&variables, L"Variable28", L"Default28", FALSE); | ||
| 201 | 203 | ||
| 202 | LPCWSTR wzDocument = | 204 | LPCWSTR wzDocument = |
| 203 | L"<Bundle>" | 205 | L"<Bundle>" |
| @@ -227,6 +229,8 @@ namespace Bootstrapper | |||
| 227 | L" <RegistrySearch Id='Search24' Type='exists' Root='HKU' Key='.DEFAULT\\System\\NetworkServiceSidSubkeyDoesNotExist' Variable='Variable24' />" | 229 | L" <RegistrySearch Id='Search24' Type='exists' Root='HKU' Key='.DEFAULT\\System\\NetworkServiceSidSubkeyDoesNotExist' Variable='Variable24' />" |
| 228 | L" <RegistrySearch Id='Search25' Type='value' Root='HKCR' Key='.msi' Variable='Variable25' VariableType='string' />" | 230 | L" <RegistrySearch Id='Search25' Type='value' Root='HKCR' Key='.msi' Variable='Variable25' VariableType='string' />" |
| 229 | L" <RegistrySearch Id='Search26' Type='value' Root='HKCR' Key='.msi' Variable='Variable26' VariableType='formatted' />" | 231 | L" <RegistrySearch Id='Search26' Type='value' Root='HKCR' Key='.msi' Variable='Variable26' VariableType='formatted' />" |
| 232 | L" <RegistrySearch Id='Search27' Type='value' Root='HKCU' Key='SOFTWARE\\Microsoft\\WiX_Burn_UnitTest\\StringDoesNotExist' Value='String' Variable='Variable27' VariableType='string' />" | ||
| 233 | L" <RegistrySearch Id='Search28' Type='value' Root='HKCU' Key='SOFTWARE\\Microsoft\\WiX_Burn_UnitTest\\String' Value='DoesNotExist' Variable='Variable28' VariableType='string' />" | ||
| 230 | L"</Bundle>"; | 234 | L"</Bundle>"; |
| 231 | 235 | ||
| 232 | // load XML document | 236 | // load XML document |
| @@ -270,6 +274,8 @@ namespace Bootstrapper | |||
| 270 | Assert::Equal(0ll, VariableGetNumericHelper(&variables, L"Variable24")); | 274 | Assert::Equal(0ll, VariableGetNumericHelper(&variables, L"Variable24")); |
| 271 | Assert::Equal<String^>(gcnew String(L"Msi.Package"), VariableGetStringHelper(&variables, L"Variable25")); | 275 | Assert::Equal<String^>(gcnew String(L"Msi.Package"), VariableGetStringHelper(&variables, L"Variable25")); |
| 272 | Assert::Equal<String^>(gcnew String(L"Msi.Package"), VariableGetStringHelper(&variables, L"Variable26")); | 276 | Assert::Equal<String^>(gcnew String(L"Msi.Package"), VariableGetStringHelper(&variables, L"Variable26")); |
| 277 | Assert::Equal<String^>(gcnew String(L"Default27"), VariableGetStringHelper(&variables, L"Variable27")); | ||
| 278 | Assert::Equal<String^>(gcnew String(L"Default28"), VariableGetStringHelper(&variables, L"Variable28")); | ||
| 273 | } | 279 | } |
| 274 | finally | 280 | finally |
| 275 | { | 281 | { |
