From 66d4fa7b30289cdbead9d6307864af8832c8c458 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 20 Mar 2024 13:42:57 -0400 Subject: Fix IniFile action values. Fixes https://github.com/wixtoolset/issues/issues/8059. --- .../wix/WixToolset.Data/Symbols/InifFileActionSymbol.cs | 4 ++-- .../WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 17 +++++++++++++++-- .../TestData/IniFile/IniFile.wxs | 10 +++++++++- 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 public enum IniFileActionType { AddLine, - AddTag, CreateLine, RemoveLine, + AddTag, RemoveTag, } -} \ No newline at end of file +} 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 result.AssertSuccess(); + result = WixRunner.Execute(new[] + { + "msi", + "validate", + msiPath + }); + + result.AssertSuccess(); + Assert.True(File.Exists(msiPath)); - var results = Query.QueryDatabase(msiPath, new[] { "IniFile" }); + var results = Query.QueryDatabase(msiPath, new[] { "IniFile", "RemoveIniFile" }); WixAssert.CompareLineByLine(new[] { - "IniFile:iniRVwYTVbDGRcXg7ckoDxDHV1iRaQ\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeKey\tSomeValue\t2\tIniComp", + "IniFile:IniAddLine\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeOtherKey\tSomeOtherValue\t0\tIniComp", + "IniFile:IniAddTag\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeOtherKey\tAnotherValueEntirely\t3\tIniComp", + "IniFile:IniCreateLine\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeKey\tSomeValue\t1\tIniComp", + "RemoveIniFile:IniRemoveLine\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeKey\t\t2\tIniComp", + "RemoveIniFile:IniRemoveTag\ttest.txt\tINSTALLFOLDER\tTestSection\tSomeOtherKey\tAnotherValueEntirely\t4\tIniComp", }, results); } } 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 @@ - + + + + + + + + + -- cgit v1.2.3-55-g6feb