From 7d699fdbbe8a15c72b69f633ac9799fb757e2acc Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 16 Oct 2019 17:04:28 -0700 Subject: Several fixes --- .../Bind/CreateOutputFromIRCommand.cs | 4 ++++ src/WixToolset.Core/Compiler_2.cs | 5 +++-- .../WixToolsetTest.CoreIntegration/LinkerFixture.cs | 2 +- src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | 18 ++++++++++++------ .../WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 8 ++++---- .../WixlibQueryFixture.cs | 4 ++-- 6 files changed, 26 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs index 9671780d..cdda4ebc 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs @@ -117,6 +117,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.AddMsiServiceConfigFailureActionsTuple((MsiServiceConfigFailureActionsTuple)tuple, output); break; + case TupleDefinitionType.MsiShortcutProperty: + this.AddTupleDefaultly(tuple, output, true); + break; + case TupleDefinitionType.MoveFile: this.AddMoveFileTuple((MoveFileTuple)tuple, output); break; diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs index 7eeb2e2e..740219cb 100644 --- a/src/WixToolset.Core/Compiler_2.cs +++ b/src/WixToolset.Core/Compiler_2.cs @@ -1297,7 +1297,7 @@ namespace WixToolset.Core { this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), progIdAdvertise.ToString())); } - else + else if (YesNoType.NotSet != progIdAdvertise) { advertise = progIdAdvertise; } @@ -2020,6 +2020,7 @@ namespace WixToolset.Core var tuple = new RegistryTuple(sourceLineNumbers, id) { Root = root.Value, + Key = key, Name = name, Value = value, ValueType = valueType, @@ -4923,7 +4924,7 @@ namespace WixToolset.Core // Ensure that RemoveExistingProducts is authored in InstallExecuteSequence // if at least one row in Upgrade table lacks the OnlyDetect attribute. - if (onlyDetect) + if (!onlyDetect) { this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", "InstallExecuteSequence", "RemoveExistingProducts"); } diff --git a/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs index dc34c2cc..80a6d1dd 100644 --- a/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs @@ -13,7 +13,7 @@ namespace WixToolsetTest.CoreIntegration public class LinkerFixture { - [Fact(Skip = "Test demonstrates failure")] + [Fact] public void CanBuildWithOverridableActions() { var folder = TestData.Get(@"TestData\OverridableActions"); diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index e30441bf..2d6feb4e 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs @@ -608,7 +608,7 @@ namespace WixToolsetTest.CoreIntegration } } - [Fact(Skip = "Test demonstrates failure")] + [Fact] public void CanBuildVersionIndependentProgId() { var folder = TestData.Get(@"TestData\ProgId"); @@ -639,11 +639,17 @@ namespace WixToolsetTest.CoreIntegration var section = intermediate.Sections.Single(); var progids = section.Tuples.OfType().OrderBy(tuple => tuple.ProgId).ToList(); - Assert.Equal(2, progids.Count); - Assert.Equal("Foo.File.hol", progids[0].ProgId); - Assert.Equal("Foo.File.hol.15", progids[0].ParentProgIdRef); - Assert.Equal("Foo.File.hol.15", progids[1].ProgId); - Assert.Null(progids[1].ParentProgIdRef); + Assert.Equal(new[] + { + "Foo.File.hol", + "Foo.File.hol.15" + }, progids.Select(p => p.ProgId).ToArray()); + + Assert.Equal(new[] + { + "Foo.File.hol.15", + null + }, progids.Select(p => p.ParentProgIdRef).ToArray()); } } diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index e2a672b7..d31c9ee8 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs @@ -181,7 +181,7 @@ namespace WixToolsetTest.CoreIntegration } } - [Fact(Skip = "Test demonstrates failure")] + [Fact] public void PopulatesClassTablesWhenProgIdIsNestedUnderAdvertisedClass() { var folder = TestData.Get(@"TestData"); @@ -396,7 +396,7 @@ namespace WixToolsetTest.CoreIntegration } } - [Fact(Skip = "Test demonstrates failure")] + [Fact] public void PopulatesInstallExecuteSequenceTable() { var folder = TestData.Get(@"TestData"); @@ -516,7 +516,7 @@ namespace WixToolsetTest.CoreIntegration } } - [Fact(Skip = "Test demonstrates failure")] + [Fact] public void PopulatesMsiShortcutPropertyTable() { var folder = TestData.Get(@"TestData"); @@ -549,7 +549,7 @@ namespace WixToolsetTest.CoreIntegration } } - [Fact(Skip = "Test demonstrates failure")] + [Fact] public void PopulatesRegistryTableFromRegistryValue() { var folder = TestData.Get(@"TestData"); diff --git a/src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs index 061eae07..517bddbf 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs @@ -12,8 +12,8 @@ namespace WixToolsetTest.CoreIntegration public class WixlibQueryFixture { - [Fact(Skip = "Test demonstrates failure")] - public void DetectOnlyUpgradeProducesReferenceToRemoveExistingProducts() + [Fact] + public void UpgradeProducesReferenceToRemoveExistingProducts() { var folder = TestData.Get(@"TestData\Upgrade"); -- cgit v1.2.3-55-g6feb