aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2024-03-20 13:42:57 -0400
committerBob Arnson <github@bobs.org>2024-03-20 14:39:21 -0400
commit66d4fa7b30289cdbead9d6307864af8832c8c458 (patch)
tree1895a651162af38fcd1f53271285a903d3b28cdd
parentdb7727a8b38e9ca118792c1f22835b3291314869 (diff)
downloadwix-66d4fa7b30289cdbead9d6307864af8832c8c458.tar.gz
wix-66d4fa7b30289cdbead9d6307864af8832c8c458.tar.bz2
wix-66d4fa7b30289cdbead9d6307864af8832c8c458.zip
Fix IniFile action values.
Fixes https://github.com/wixtoolset/issues/issues/8059.
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/InifFileActionSymbol.cs4
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs17
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/TestData/IniFile/IniFile.wxs10
3 files changed, 26 insertions, 5 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/InifFileActionSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/InifFileActionSymbol.cs
index a04567ec..994aa383 100644
--- a/src/api/wix/WixToolset.Data/Symbols/InifFileActionSymbol.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/InifFileActionSymbol.cs
@@ -5,9 +5,9 @@ namespace WixToolset.Data.Symbols
5 public enum IniFileActionType 5 public enum IniFileActionType
6 { 6 {
7 AddLine, 7 AddLine,
8 AddTag,
9 CreateLine, 8 CreateLine,
10 RemoveLine, 9 RemoveLine,
10 AddTag,
11 RemoveTag, 11 RemoveTag,
12 } 12 }
13} \ No newline at end of file 13}
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
index b1d2955b..a8b9c3e8 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
@@ -526,11 +526,24 @@ namespace WixToolsetTest.CoreIntegration
526 526
527 result.AssertSuccess(); 527 result.AssertSuccess();
528 528
529 result = WixRunner.Execute(new[]
530 {
531 "msi",
532 "validate",
533 msiPath
534 });
535
536 result.AssertSuccess();
537
529 Assert.True(File.Exists(msiPath)); 538 Assert.True(File.Exists(msiPath));
530 var results = Query.QueryDatabase(msiPath, new[] { "IniFile" }); 539 var results = Query.QueryDatabase(msiPath, new[] { "IniFile", "RemoveIniFile" });
531 WixAssert.CompareLineByLine(new[] 540 WixAssert.CompareLineByLine(new[]
532 { 541 {
533 "IniFile:iniRVwYTVbDGRcXg7ckoDxDHV1iRaQ\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeKey\tSomeValue\t2\tIniComp", 542 "IniFile:IniAddLine\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeOtherKey\tSomeOtherValue\t0\tIniComp",
543 "IniFile:IniAddTag\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeOtherKey\tAnotherValueEntirely\t3\tIniComp",
544 "IniFile:IniCreateLine\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeKey\tSomeValue\t1\tIniComp",
545 "RemoveIniFile:IniRemoveLine\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeKey\t\t2\tIniComp",
546 "RemoveIniFile:IniRemoveTag\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeOtherKey\tAnotherValueEntirely\t4\tIniComp",
534 }, results); 547 }, results);
535 } 548 }
536 } 549 }
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/IniFile/IniFile.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/IniFile/IniFile.wxs
index f442beb6..dbd011a7 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/IniFile/IniFile.wxs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/IniFile/IniFile.wxs
@@ -5,7 +5,15 @@
5 <Component Id="IniComp" Directory="INSTALLFOLDER"> 5 <Component Id="IniComp" Directory="INSTALLFOLDER">
6 <File Id="test.txt" Source="test.txt" /> 6 <File Id="test.txt" Source="test.txt" />
7 7
8 <IniFile Action="createLine" Directory="INSTALLFOLDER" Name="test.txt" Section="TestSection" Key="SomeKey" Value="SomeValue" /> 8 <IniFile Action="createLine" Directory="INSTALLFOLDER" Name="test.txt" Section="TestSection" Key="SomeKey" Value="SomeValue" Id="IniCreateLine" />
9
10 <IniFile Action="addLine" Directory="INSTALLFOLDER" Name="test.txt" Section="TestSection" Key="SomeOtherKey" Value="SomeOtherValue" Id="IniAddLine" />
11
12 <IniFile Action="addTag" Directory="INSTALLFOLDER" Name="test.txt" Section="TestSection" Key="SomeOtherKey" Value="AnotherValueEntirely" Id="IniAddTag" />
13
14 <IniFile Action="removeLine" Directory="INSTALLFOLDER" Name="test.txt" Section="TestSection" Key="SomeKey" Id="IniRemoveLine" />
15
16 <IniFile Action="removeTag" Directory="INSTALLFOLDER" Name="test.txt" Section="TestSection" Key="SomeOtherKey" Value="AnotherValueEntirely" Id="IniRemoveTag" />
9 </Component> 17 </Component>
10 </ComponentGroup> 18 </ComponentGroup>
11 </Fragment> 19 </Fragment>