From 4d96895a19c79ced1543d44e181527824c82c8e8 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 16 May 2020 16:38:14 +1000 Subject: Process Unreal custom tables in CreateBootstrapperApplicationManifestCommand --- .../BundleManifestFixture.cs | 39 ++++++++++++++++++++++ .../BundleCustomTable/BundleCustomTable.wxs | 26 +++++++++++++++ .../WixToolsetTest.CoreIntegration.csproj | 1 + 3 files changed, 66 insertions(+) create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs (limited to 'src/test') diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs index ebfdb872..53036919 100644 --- a/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs @@ -12,6 +12,45 @@ namespace WixToolsetTest.CoreIntegration public class BundleManifestFixture { + [Fact] + public void PopulatesBAManifestWithUnrealCustomTable() + { + var folder = TestData.Get(@"TestData"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var bundlePath = Path.Combine(baseFolder, @"bin\test.exe"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "BundleCustomTable", "BundleCustomTable.wxs"), + Path.Combine(folder, "BundleWithPackageGroupRef", "MinimalPackageGroup.wxs"), + Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), + "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), + "-intermediateFolder", intermediateFolder, + "-o", bundlePath + }); + + result.AssertSuccess(); + + Assert.True(File.Exists(bundlePath)); + + var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); + extractResult.AssertSuccess(); + + var customElements = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:BundleCustomTable"); + Assert.Equal(3, customElements.Count); + Assert.Equal("", customElements[0].GetTestXml()); + Assert.Equal("", customElements[1].GetTestXml()); + Assert.Equal("", customElements[2].GetTestXml()); + } + } + [Fact] public void PopulatesManifestWithBundleExtension() { diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs new file mode 100644 index 00000000..dacbc014 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + one + two + + + < + > + + + 1 + 2 + + + + diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 3989699d..0651ec7a 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj @@ -22,6 +22,7 @@ + -- cgit v1.2.3-55-g6feb