diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-05-16 16:38:14 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-05-16 21:33:56 +1000 |
| commit | 4d96895a19c79ced1543d44e181527824c82c8e8 (patch) | |
| tree | d5fb992122b23bc1b792b62c40e7a8e0c107fc3a /src/test/WixToolsetTest.CoreIntegration | |
| parent | ed8fbdf2bfedca8981b6b352568a7303e791a5b5 (diff) | |
| download | wix-4d96895a19c79ced1543d44e181527824c82c8e8.tar.gz wix-4d96895a19c79ced1543d44e181527824c82c8e8.tar.bz2 wix-4d96895a19c79ced1543d44e181527824c82c8e8.zip | |
Process Unreal custom tables in CreateBootstrapperApplicationManifestCommand
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration')
3 files changed, 66 insertions, 0 deletions
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 | |||
| @@ -13,6 +13,45 @@ namespace WixToolsetTest.CoreIntegration | |||
| 13 | public class BundleManifestFixture | 13 | public class BundleManifestFixture |
| 14 | { | 14 | { |
| 15 | [Fact] | 15 | [Fact] |
| 16 | public void PopulatesBAManifestWithUnrealCustomTable() | ||
| 17 | { | ||
| 18 | var folder = TestData.Get(@"TestData"); | ||
| 19 | |||
| 20 | using (var fs = new DisposableFileSystem()) | ||
| 21 | { | ||
| 22 | var baseFolder = fs.GetFolder(); | ||
| 23 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 24 | var bundlePath = Path.Combine(baseFolder, @"bin\test.exe"); | ||
| 25 | var baFolderPath = Path.Combine(baseFolder, "ba"); | ||
| 26 | var extractFolderPath = Path.Combine(baseFolder, "extract"); | ||
| 27 | |||
| 28 | var result = WixRunner.Execute(new[] | ||
| 29 | { | ||
| 30 | "build", | ||
| 31 | Path.Combine(folder, "BundleCustomTable", "BundleCustomTable.wxs"), | ||
| 32 | Path.Combine(folder, "BundleWithPackageGroupRef", "MinimalPackageGroup.wxs"), | ||
| 33 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
| 34 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
| 35 | "-intermediateFolder", intermediateFolder, | ||
| 36 | "-o", bundlePath | ||
| 37 | }); | ||
| 38 | |||
| 39 | result.AssertSuccess(); | ||
| 40 | |||
| 41 | Assert.True(File.Exists(bundlePath)); | ||
| 42 | |||
| 43 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); | ||
| 44 | extractResult.AssertSuccess(); | ||
| 45 | |||
| 46 | var customElements = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:BundleCustomTable"); | ||
| 47 | Assert.Equal(3, customElements.Count); | ||
| 48 | Assert.Equal("<BundleCustomTable Id='one' Column2='two' />", customElements[0].GetTestXml()); | ||
| 49 | Assert.Equal("<BundleCustomTable Column2='<' Id='>' />", customElements[1].GetTestXml()); | ||
| 50 | Assert.Equal("<BundleCustomTable Id='1' Column2='2' />", customElements[2].GetTestXml()); | ||
| 51 | } | ||
| 52 | } | ||
| 53 | |||
| 54 | [Fact] | ||
| 16 | public void PopulatesManifestWithBundleExtension() | 55 | public void PopulatesManifestWithBundleExtension() |
| 17 | { | 56 | { |
| 18 | var folder = TestData.Get(@"TestData"); | 57 | var folder = TestData.Get(@"TestData"); |
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 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <PackageGroup Id="BundlePackages"> | ||
| 5 | <PackageGroupRef Id="MinimalPackageGroup" /> | ||
| 6 | </PackageGroup> | ||
| 7 | |||
| 8 | <CustomTable Id="BundleCustomTable" Unreal="yes"> | ||
| 9 | <Column Id="Id" Type="string" PrimaryKey="yes" /> | ||
| 10 | <Column Id="Column2" Type="string" PrimaryKey="yes" /> | ||
| 11 | |||
| 12 | <Row> | ||
| 13 | <Data Column="Id">one</Data> | ||
| 14 | <Data Column="Column2">two</Data> | ||
| 15 | </Row> | ||
| 16 | <Row> | ||
| 17 | <Data Column="Column2"><</Data> | ||
| 18 | <Data Column="Id">></Data> | ||
| 19 | </Row> | ||
| 20 | <Row> | ||
| 21 | <Data Column="Id">1</Data> | ||
| 22 | <Data Column="Column2">2</Data> | ||
| 23 | </Row> | ||
| 24 | </CustomTable> | ||
| 25 | </Fragment> | ||
| 26 | </Wix> | ||
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 @@ | |||
| 22 | <Content Include="TestData\AppSearch\NestedDirSearchUnderRegSearch.msi" CopyToOutputDirectory="PreserveNewest" /> | 22 | <Content Include="TestData\AppSearch\NestedDirSearchUnderRegSearch.msi" CopyToOutputDirectory="PreserveNewest" /> |
| 23 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 24 | <Content Include="TestData\BadEnsureTable\BadEnsureTable.wxs" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\BadEnsureTable\BadEnsureTable.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 25 | <Content Include="TestData\BundleCustomTable\BundleCustomTable.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 25 | <Content Include="TestData\BundleExtension\BundleExtension.wxs" CopyToOutputDirectory="PreserveNewest" /> | 26 | <Content Include="TestData\BundleExtension\BundleExtension.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 26 | <Content Include="TestData\BundleExtension\BundleExtensionSearches.wxs" CopyToOutputDirectory="PreserveNewest" /> | 27 | <Content Include="TestData\BundleExtension\BundleExtensionSearches.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 27 | <Content Include="TestData\BundleExtension\BundleWithSearches.wxs" CopyToOutputDirectory="PreserveNewest" /> | 28 | <Content Include="TestData\BundleExtension\BundleWithSearches.wxs" CopyToOutputDirectory="PreserveNewest" /> |
