aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-07-06 10:58:28 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-07-06 12:28:54 -0500
commit666737664cef051fa5a118bb8d14f7708b7db8af (patch)
treefb572f428692bf8d3064689b58f36c00102ac7d2
parent0c0bb770717785e0a144272cbd9fe6390452fb64 (diff)
downloadwix-666737664cef051fa5a118bb8d14f7708b7db8af.tar.gz
wix-666737664cef051fa5a118bb8d14f7708b7db8af.tar.bz2
wix-666737664cef051fa5a118bb8d14f7708b7db8af.zip
Improve whitespace handling in Burn conditions.
Fixes #4702
-rw-r--r--src/burn/engine/condition.cpp2
-rw-r--r--src/burn/test/BurnUnitTest/VariableTest.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/burn/engine/condition.cpp b/src/burn/engine/condition.cpp
index b7cd7413..8fa62f16 100644
--- a/src/burn/engine/condition.cpp
+++ b/src/burn/engine/condition.cpp
@@ -525,7 +525,7 @@ static HRESULT NextSymbol(
525 while (L'\0' != pContext->wzRead[0]) 525 while (L'\0' != pContext->wzRead[0])
526 { 526 {
527 ::GetStringTypeW(CT_CTYPE1, pContext->wzRead, 1, &charType); 527 ::GetStringTypeW(CT_CTYPE1, pContext->wzRead, 1, &charType);
528 if (0 == (C1_BLANK & charType)) 528 if (0 == ((C1_BLANK | C1_SPACE) & charType))
529 { 529 {
530 break; // no blank, done 530 break; // no blank, done
531 } 531 }
diff --git a/src/burn/test/BurnUnitTest/VariableTest.cpp b/src/burn/test/BurnUnitTest/VariableTest.cpp
index 055d63d9..259fb468 100644
--- a/src/burn/test/BurnUnitTest/VariableTest.cpp
+++ b/src/burn/test/BurnUnitTest/VariableTest.cpp
@@ -261,6 +261,8 @@ namespace Bootstrapper
261 Assert::True(EvaluateConditionHelper(&variables, L"PROP1 = \"VAL1\"")); 261 Assert::True(EvaluateConditionHelper(&variables, L"PROP1 = \"VAL1\""));
262 Assert::False(EvaluateConditionHelper(&variables, L"NONE = \"NOT\"")); 262 Assert::False(EvaluateConditionHelper(&variables, L"NONE = \"NOT\""));
263 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 <> \"VAL1\"")); 263 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 <> \"VAL1\""));
264 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 <>\n\"VAL1\""));
265 Assert::True(EvaluateConditionHelper(&variables, L"PROP1 <> \"VAL1\nVAL2\""));
264 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 ~<> \"VAL1\"")); 266 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 ~<> \"VAL1\""));
265 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 ~<> \"Val1\"")); 267 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 ~<> \"Val1\""));
266 Assert::True(EvaluateConditionHelper(&variables, L"NONE <> \"NOT\"")); 268 Assert::True(EvaluateConditionHelper(&variables, L"NONE <> \"NOT\""));