diff options
Diffstat (limited to 'src/burn/test/BurnUnitTest/VariableTest.cpp')
| -rw-r--r-- | src/burn/test/BurnUnitTest/VariableTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/burn/test/BurnUnitTest/VariableTest.cpp b/src/burn/test/BurnUnitTest/VariableTest.cpp index b373ae8e..d07e0304 100644 --- a/src/burn/test/BurnUnitTest/VariableTest.cpp +++ b/src/burn/test/BurnUnitTest/VariableTest.cpp | |||
| @@ -92,7 +92,6 @@ namespace Bootstrapper | |||
| 92 | L" <Variable Id='Var5' Type='string' Value='' Hidden='no' Persisted='no' />" | 92 | L" <Variable Id='Var5' Type='string' Value='' Hidden='no' Persisted='no' />" |
| 93 | L" <Variable Id='Var6' Type='formatted' Value='[Formatted]' Hidden='no' Persisted='no' />" | 93 | L" <Variable Id='Var6' Type='formatted' Value='[Formatted]' Hidden='no' Persisted='no' />" |
| 94 | L" <Variable Id='Formatted' Type='formatted' Value='supersecret' Hidden='yes' Persisted='no' />" | 94 | L" <Variable Id='Formatted' Type='formatted' Value='supersecret' Hidden='yes' Persisted='no' />" |
| 95 | L" <CommandLine Variables='upperCase' />" | ||
| 96 | L"</Bundle>"; | 95 | L"</Bundle>"; |
| 97 | 96 | ||
| 98 | hr = VariableInitialize(&variables); | 97 | hr = VariableInitialize(&variables); |
| @@ -104,8 +103,6 @@ namespace Bootstrapper | |||
| 104 | hr = VariablesParseFromXml(&variables, pixeBundle); | 103 | hr = VariablesParseFromXml(&variables, pixeBundle); |
| 105 | TestThrowOnFailure(hr, L"Failed to parse variables from XML."); | 104 | TestThrowOnFailure(hr, L"Failed to parse variables from XML."); |
| 106 | 105 | ||
| 107 | Assert::Equal((int)BURN_VARIABLE_COMMAND_LINE_TYPE_UPPER_CASE, (int)variables.commandLineType); | ||
| 108 | |||
| 109 | // get and verify variable values | 106 | // get and verify variable values |
| 110 | Assert::Equal((int)BURN_VARIANT_TYPE_NUMERIC, VariableGetTypeHelper(&variables, L"Var1")); | 107 | Assert::Equal((int)BURN_VARIANT_TYPE_NUMERIC, VariableGetTypeHelper(&variables, L"Var1")); |
| 111 | Assert::Equal((int)BURN_VARIANT_TYPE_STRING, VariableGetTypeHelper(&variables, L"Var2")); | 108 | Assert::Equal((int)BURN_VARIANT_TYPE_STRING, VariableGetTypeHelper(&variables, L"Var2")); |
| @@ -123,6 +120,11 @@ namespace Bootstrapper | |||
| 123 | Assert::Equal<BOOL>(TRUE, fContainsHiddenData); | 120 | Assert::Equal<BOOL>(TRUE, fContainsHiddenData); |
| 124 | Assert::Equal<String^>(gcnew String(L"String value."), VariableGetFormattedHelper(&variables, L"Var2", &fContainsHiddenData)); | 121 | Assert::Equal<String^>(gcnew String(L"String value."), VariableGetFormattedHelper(&variables, L"Var2", &fContainsHiddenData)); |
| 125 | Assert::Equal<BOOL>(FALSE, fContainsHiddenData); | 122 | Assert::Equal<BOOL>(FALSE, fContainsHiddenData); |
| 123 | |||
| 124 | Assert::True(VariableIsHiddenCommandLine(&variables, L"Formatted")); | ||
| 125 | Assert::True(VariableIsHiddenCommandLine(&variables, L"FORMATTED")); | ||
| 126 | Assert::True(VariableIsHiddenCommandLine(&variables, L"formatted")); | ||
| 127 | Assert::False(VariableIsHiddenCommandLine(&variables, L"var6")); | ||
| 126 | } | 128 | } |
| 127 | finally | 129 | finally |
| 128 | { | 130 | { |
| @@ -143,7 +145,6 @@ namespace Bootstrapper | |||
| 143 | LPCWSTR wzDocument = | 145 | LPCWSTR wzDocument = |
| 144 | L"<Bundle>" | 146 | L"<Bundle>" |
| 145 | L" <Variable Id='WixCustomVariable' Type='numeric' Value='1' Hidden='no' Persisted='no' />" | 147 | L" <Variable Id='WixCustomVariable' Type='numeric' Value='1' Hidden='no' Persisted='no' />" |
| 146 | L" <CommandLine Variables='upperCase' />" | ||
| 147 | L"</Bundle>"; | 148 | L"</Bundle>"; |
| 148 | 149 | ||
| 149 | hr = VariableInitialize(&variables); | 150 | hr = VariableInitialize(&variables); |
| @@ -173,7 +174,6 @@ namespace Bootstrapper | |||
| 173 | { | 174 | { |
| 174 | LPCWSTR wzDocument = | 175 | LPCWSTR wzDocument = |
| 175 | L"<Bundle>" | 176 | L"<Bundle>" |
| 176 | L" <CommandLine Variables='upperCase' />" | ||
| 177 | L"</Bundle>"; | 177 | L"</Bundle>"; |
| 178 | 178 | ||
| 179 | hr = VariableInitialize(&variables); | 179 | hr = VariableInitialize(&variables); |
