@joebigelow / wix / commits / 66d4fa7b

Fix IniFile action values.

Fixes https://github.com/wixtoolset/issues/issues/8059.

Bob Arnson committed Mar 20, 2024 at 13:42 UTC 66d4fa7b30289cdbead9d6307864af8832c8c458
3 files changed +26 -5
src/api/wix/WixToolset.Data/Symbols/InifFileActionSymbol.cs
+2 -2
@@ -5,9 +5,9 @@ namespace WixToolset.Data.Symbols
5 public enum IniFileActionType
6 {
7 AddLine,
8 - AddTag,
8 CreateLine,
9 RemoveLine,
10 + AddTag,
11 RemoveTag,
12 }
13 -}
\ No newline at end of file
13 +}
src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+15 -2
@@ -526,11 +526,24 @@ namespace WixToolsetTest.CoreIntegration
526
527 result.AssertSuccess();
528
529 + result = WixRunner.Execute(new[]
530 + {
531 + "msi",
532 + "validate",
533 + msiPath
534 + });
535 +
536 + result.AssertSuccess();
537 +
538 Assert.True(File.Exists(msiPath));
530 - var results = Query.QueryDatabase(msiPath, new[] { "IniFile" });
539 + var results = Query.QueryDatabase(msiPath, new[] { "IniFile", "RemoveIniFile" });
540 WixAssert.CompareLineByLine(new[]
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",
547 }, results);
548 }
549 }
src/wix/test/WixToolsetTest.CoreIntegration/TestData/IniFile/IniFile.wxs
+9 -1
@@ -5,7 +5,15 @@
5 <Component Id="IniComp" Directory="INSTALLFOLDER">
6 <File Id="test.txt" Source="test.txt" />
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" />
17 </Component>
18 </ComponentGroup>
19 </Fragment>