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 | |
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')
3 files changed, 45 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"); |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/EnsureTable/EnsureTable.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/EnsureTable/EnsureTable.wxs new file mode 100644 index 00000000..01767abb --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/EnsureTable/EnsureTable.wxs | |||
@@ -0,0 +1,10 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
3 | <Fragment> | ||
4 | <ComponentGroup Id="ProductComponents"> | ||
5 | <ComponentGroupRef Id="MinimalComponentGroup" /> | ||
6 | </ComponentGroup> | ||
7 | |||
8 | <EnsureTable Id="Wix4Example" /> | ||
9 | </Fragment> | ||
10 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 921c77f9..98402223 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
@@ -37,6 +37,7 @@ | |||
37 | <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 37 | <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
38 | <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 38 | <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
39 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | 39 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> |
40 | <Content Include="TestData\EnsureTable\EnsureTable.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
40 | <Content Include="TestData\Environment\Environment.wxs" CopyToOutputDirectory="PreserveNewest" /> | 41 | <Content Include="TestData\Environment\Environment.wxs" CopyToOutputDirectory="PreserveNewest" /> |
41 | <Content Include="TestData\ErrorsInUI\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | 42 | <Content Include="TestData\ErrorsInUI\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> |
42 | <Content Include="TestData\ErrorsInUI\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 43 | <Content Include="TestData\ErrorsInUI\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |