diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-03 16:14:32 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-03 20:46:59 +1000 |
| commit | a26c9ac0e9b02360b298ae5c619ca4070d11ae9a (patch) | |
| tree | caa1361272a8ff67f1c38ac37f8256ab7d967072 /src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |
| parent | 11112ebcdf97d4fa53e34d9dfe48410ff2378435 (diff) | |
| download | wix-a26c9ac0e9b02360b298ae5c619ca4070d11ae9a.tar.gz wix-a26c9ac0e9b02360b298ae5c619ca4070d11ae9a.tar.bz2 wix-a26c9ac0e9b02360b298ae5c619ca4070d11ae9a.zip | |
Add failing test for when EnsureTable references an extension table with a different name than its tuple.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index d93b3d54..0010f3f2 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -2,8 +2,10 @@ | |||
| 2 | 2 | ||
| 3 | namespace WixToolsetTest.CoreIntegration | 3 | namespace WixToolsetTest.CoreIntegration |
| 4 | { | 4 | { |
| 5 | using System; | ||
| 5 | using System.IO; | 6 | using System.IO; |
| 6 | using System.Linq; | 7 | using System.Linq; |
| 8 | using Example.Extension; | ||
| 7 | using WixBuildTools.TestSupport; | 9 | using WixBuildTools.TestSupport; |
| 8 | using WixToolset.Core.TestPackage; | 10 | using WixToolset.Core.TestPackage; |
| 9 | using Xunit; | 11 | using Xunit; |
| @@ -527,6 +529,38 @@ namespace WixToolsetTest.CoreIntegration | |||
| 527 | } | 529 | } |
| 528 | 530 | ||
| 529 | [Fact] | 531 | [Fact] |
| 532 | public void PopulatesExampleTableBecauseOfEnsureTable() | ||
| 533 | { | ||
| 534 | var folder = TestData.Get(@"TestData"); | ||
| 535 | var extensionPath = Path.GetFullPath(new Uri(typeof(ExampleExtensionFactory).Assembly.CodeBase).LocalPath); | ||
| 536 | |||
| 537 | using (var fs = new DisposableFileSystem()) | ||
| 538 | { | ||
| 539 | var baseFolder = fs.GetFolder(); | ||
| 540 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 541 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 542 | |||
| 543 | var result = WixRunner.Execute(new[] | ||
| 544 | { | ||
| 545 | "build", | ||
| 546 | Path.Combine(folder, "EnsureTable", "EnsureTable.wxs"), | ||
| 547 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 548 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 549 | "-ext", extensionPath, | ||
| 550 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 551 | "-intermediateFolder", intermediateFolder, | ||
| 552 | "-o", msiPath | ||
| 553 | }); | ||
| 554 | |||
| 555 | result.AssertSuccess(); | ||
| 556 | |||
| 557 | Assert.True(File.Exists(msiPath)); | ||
| 558 | var results = Query.QueryDatabaseByTable(msiPath, new[] { "Wix4Example" }); | ||
| 559 | Assert.Empty(results["Wix4Example"]); | ||
| 560 | } | ||
| 561 | } | ||
| 562 | |||
| 563 | [Fact] | ||
| 530 | public void PopulatesFeatureTableWithParent() | 564 | public void PopulatesFeatureTableWithParent() |
| 531 | { | 565 | { |
| 532 | var folder = TestData.Get(@"TestData"); | 566 | var folder = TestData.Get(@"TestData"); |
