aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2024-02-17 17:56:57 -0500
committerBob Arnson <github@bobs.org>2024-02-17 18:39:07 -0500
commita38b07af45eb36cc13fcd2546ac45e6f769e4d6f (patch)
treef3f872f0154bd09a589becc0a45c597445911c50
parente98ff251390fe60946576b4dced9565ae3a43e43 (diff)
downloadwix-a38b07af45eb36cc13fcd2546ac45e6f769e4d6f.tar.gz
wix-a38b07af45eb36cc13fcd2546ac45e6f769e4d6f.tar.bz2
wix-a38b07af45eb36cc13fcd2546ac45e6f769e4d6f.zip
Allow MsiProperty/@Value to be an empty string.
Fixes https://github.com/wixtoolset/issues/issues/7798.
-rw-r--r--src/test/burn/TestData/VariableTests/BundleA/BundleA.wxs1
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs2
-rw-r--r--src/wix/WixToolset.Core/Compiler_Bundle.cs2
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs9
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/TestData/SimpleBundle/Bundle.wxs1
5 files changed, 13 insertions, 2 deletions
diff --git a/src/test/burn/TestData/VariableTests/BundleA/BundleA.wxs b/src/test/burn/TestData/VariableTests/BundleA/BundleA.wxs
index f243c97d..86772ae9 100644
--- a/src/test/burn/TestData/VariableTests/BundleA/BundleA.wxs
+++ b/src/test/burn/TestData/VariableTests/BundleA/BundleA.wxs
@@ -8,6 +8,7 @@
8 <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)"> 8 <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)">
9 <MsiProperty Name="INSTALLLOCATION" Value="[INSTALLLOCATION]" /> 9 <MsiProperty Name="INSTALLLOCATION" Value="[INSTALLLOCATION]" />
10 <MsiProperty Name="LICENSEKEY" Value="[LICENSEKEY]" /> 10 <MsiProperty Name="LICENSEKEY" Value="[LICENSEKEY]" />
11 <MsiProperty Name="BLANKPROPERTY" Value="" />
11 </MsiPackage> 12 </MsiPackage>
12 </PackageGroup> 13 </PackageGroup>
13 14
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs
index 22e94260..fcd46e0b 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs
@@ -30,7 +30,7 @@ namespace WixToolsetTest.BurnE2E
30 // Burn logging its command line. 30 // Burn logging its command line.
31 Assert.True(LogVerifier.MessageInLogFile(logFilePath, "InstallLocation=nothingtoseehere licensekey=*****")); 31 Assert.True(LogVerifier.MessageInLogFile(logFilePath, "InstallLocation=nothingtoseehere licensekey=*****"));
32 // Burn logging the MSI install command line. 32 // Burn logging the MSI install command line.
33 Assert.True(LogVerifier.MessageInLogFile(logFilePath, "INSTALLLOCATION=\"nothingtoseehere\" LICENSEKEY=\"*****\"")); 33 Assert.True(LogVerifier.MessageInLogFile(logFilePath, "INSTALLLOCATION=\"nothingtoseehere\" LICENSEKEY=\"*****\" BLANKPROPERTY=\"\""));
34 Assert.False(LogVerifier.MessageInLogFile(logFilePath, "supersecretkey")); 34 Assert.False(LogVerifier.MessageInLogFile(logFilePath, "supersecretkey"));
35 } 35 }
36 36
diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs
index 7790d50d..bf68f3bd 100644
--- a/src/wix/WixToolset.Core/Compiler_Bundle.cs
+++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs
@@ -3340,7 +3340,7 @@ namespace WixToolset.Core
3340 name = this.Core.GetAttributeMsiPropertyNameValue(sourceLineNumbers, attrib); 3340 name = this.Core.GetAttributeMsiPropertyNameValue(sourceLineNumbers, attrib);
3341 break; 3341 break;
3342 case "Value": 3342 case "Value":
3343 value = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3343 value = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
3344 break; 3344 break;
3345 case "Condition": 3345 case "Condition":
3346 condition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3346 condition = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
index 840334b1..7b5aeab6 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
@@ -177,6 +177,15 @@ namespace WixToolsetTest.CoreIntegration
177 { 177 {
178 "<Payload Id='test.msi' FilePath='test.msi' FileSize='*' Hash='*' Packaging='embedded' SourcePath='a0' Container='WixAttachedContainer' />", 178 "<Payload Id='test.msi' FilePath='test.msi' FileSize='*' Hash='*' Packaging='embedded' SourcePath='a0' Container='WixAttachedContainer' />",
179 }, msiPayloads); 179 }, msiPayloads);
180
181 var msiProperties = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsiPackage[@Id='test.msi']/burn:MsiProperty", ignoreAttributesByElementName);
182 WixAssert.CompareLineByLine(new[]
183 {
184 "<MsiProperty Id='TEST' Value='1' />",
185 "<MsiProperty Id='TESTBLANK' Value='' />",
186 "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />",
187 "<MsiProperty Id='MSIFASTINSTALL' Value='7' />",
188 }, msiProperties);
180 } 189 }
181 190
182 var manifestResource = new Resource(ResourceType.Manifest, "#1", 1033); 191 var manifestResource = new Resource(ResourceType.Manifest, "#1", 1033);
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SimpleBundle/Bundle.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SimpleBundle/Bundle.wxs
index 01b9e716..0593cd0f 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SimpleBundle/Bundle.wxs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SimpleBundle/Bundle.wxs
@@ -6,6 +6,7 @@
6 <Chain> 6 <Chain>
7 <MsiPackage SourceFile="test.msi"> 7 <MsiPackage SourceFile="test.msi">
8 <MsiProperty Name="TEST" Value="1" /> 8 <MsiProperty Name="TEST" Value="1" />
9 <MsiProperty Name="TESTBLANK" Value="" />
9 </MsiPackage> 10 </MsiPackage>
10 </Chain> 11 </Chain>
11 </Bundle> 12 </Bundle>