diff options
Diffstat (limited to '')
| -rw-r--r-- | src/burn/test/BurnUnitTest/VariableTest.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/burn/test/BurnUnitTest/VariableTest.cpp b/src/burn/test/BurnUnitTest/VariableTest.cpp index f864307c..8ee6e179 100644 --- a/src/burn/test/BurnUnitTest/VariableTest.cpp +++ b/src/burn/test/BurnUnitTest/VariableTest.cpp | |||
| @@ -163,6 +163,39 @@ namespace Bootstrapper | |||
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | [Fact] | 165 | [Fact] |
| 166 | void VariablesSetCustomWixVariableTest() | ||
| 167 | { | ||
| 168 | HRESULT hr = S_OK; | ||
| 169 | IXMLDOMElement* pixeBundle = NULL; | ||
| 170 | BURN_VARIABLES variables = { }; | ||
| 171 | |||
| 172 | try | ||
| 173 | { | ||
| 174 | LPCWSTR wzDocument = | ||
| 175 | L"<Bundle>" | ||
| 176 | L" <CommandLine Variables='upperCase' />" | ||
| 177 | L"</Bundle>"; | ||
| 178 | |||
| 179 | hr = VariableInitialize(&variables); | ||
| 180 | TestThrowOnFailure(hr, L"Failed to initialize variables."); | ||
| 181 | |||
| 182 | // load XML document | ||
| 183 | LoadBundleXmlHelper(wzDocument, &pixeBundle); | ||
| 184 | |||
| 185 | hr = VariablesParseFromXml(&variables, pixeBundle); | ||
| 186 | NativeAssert::Succeeded(hr, "Failed to parse variables from XML."); | ||
| 187 | |||
| 188 | hr = VariableSetString(&variables, L"WixCustomVariable", L"something", FALSE, FALSE); | ||
| 189 | NativeAssert::Succeeded(hr, "Failed to set 'WixCustomVariable' variable."); | ||
| 190 | } | ||
| 191 | finally | ||
| 192 | { | ||
| 193 | ReleaseObject(pixeBundle); | ||
| 194 | VariablesUninitialize(&variables); | ||
| 195 | } | ||
| 196 | } | ||
| 197 | |||
| 198 | [Fact] | ||
| 166 | void VariablesFormatTest() | 199 | void VariablesFormatTest() |
| 167 | { | 200 | { |
| 168 | HRESULT hr = S_OK; | 201 | HRESULT hr = S_OK; |
