From a96ae75e256712829ac2174688c71e6a14ba1943 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 30 Sep 2019 10:01:55 +1000 Subject: Add failing test for CustomAction. --- .../MsiQueryFixture.cs | 34 ++++++++++++++++++++++ .../CustomAction/UnscheduledCustomAction.wxs | 11 +++++++ .../WixToolsetTest.CoreIntegration.csproj | 1 + 3 files changed, 46 insertions(+) create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index e7443f35..fb42d8fc 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs @@ -146,6 +146,40 @@ namespace WixToolsetTest.CoreIntegration } } + [Fact(Skip = "Test demonstrates failure")] + public void PopulatesCustomActionTable() + { + var folder = TestData.Get(@"TestData"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "CustomAction", "UnscheduledCustomAction.wxs"), + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), + "-bindpath", Path.Combine(folder, "SingleFile", "data"), + "-intermediateFolder", intermediateFolder, + "-o", msiPath + }); + + result.AssertSuccess(); + + Assert.True(File.Exists(msiPath)); + var results = Query.QueryDatabase(msiPath, new[] { "Binary", "CustomAction" }); + Assert.Equal(new[] + { + "Binary:Binary1\t[Binary data]", + "CustomAction:CustomAction1\t1\tBinary1\tInvalidEntryPoint\t", + }, results); + } + } + [Fact(Skip = "Test demonstrates failure")] public void PopulatesDirectoryTableWithValidDefaultDir() { diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs new file mode 100644 index 00000000..d9633869 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 16f200c3..1bbf2aab 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj @@ -17,6 +17,7 @@ + -- cgit v1.2.3-55-g6feb