diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-07-01 19:35:48 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-07-01 19:38:57 +1000 |
| commit | 83be85cdfca822028df65558bb3ac7f22d4de228 (patch) | |
| tree | be2811994c56d6e610222597517ca04493fc475d /src/test | |
| parent | 4c2abc241ea8c7816a3eac83a44d186f2b504f73 (diff) | |
| download | wix-83be85cdfca822028df65558bb3ac7f22d4de228.tar.gz wix-83be85cdfca822028df65558bb3ac7f22d4de228.tar.bz2 wix-83be85cdfca822028df65558bb3ac7f22d4de228.zip | |
Add failing test for CustomAction cycle.
Diffstat (limited to 'src/test')
3 files changed, 61 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs b/src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs new file mode 100644 index 00000000..814b5a26 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.CoreIntegration | ||
| 4 | { | ||
| 5 | using System.IO; | ||
| 6 | using System.Linq; | ||
| 7 | using WixBuildTools.TestSupport; | ||
| 8 | using WixToolset.Core.TestPackage; | ||
| 9 | using WixToolset.Data; | ||
| 10 | using Xunit; | ||
| 11 | |||
| 12 | public class CustomActionFixture | ||
| 13 | { | ||
| 14 | [Fact(Skip = "Test demonstrates failure")] | ||
| 15 | public void PopulatesCustomActionTable() | ||
| 16 | { | ||
| 17 | var folder = TestData.Get(@"TestData"); | ||
| 18 | |||
| 19 | using (var fs = new DisposableFileSystem()) | ||
| 20 | { | ||
| 21 | var baseFolder = fs.GetFolder(); | ||
| 22 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 23 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 24 | |||
| 25 | var result = WixRunner.Execute(new[] | ||
| 26 | { | ||
| 27 | "build", | ||
| 28 | Path.Combine(folder, "CustomAction", "CustomActionCycle.wxs"), | ||
| 29 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 30 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 31 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 32 | "-intermediateFolder", intermediateFolder, | ||
| 33 | "-o", msiPath | ||
| 34 | }); | ||
| 35 | |||
| 36 | var warnings = result.Messages.Where(m => m.Level == MessageLevel.Warning).ToArray(); | ||
| 37 | Assert.False(result.ExitCode == 0 && warnings.Length == 0); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | } | ||
| 41 | } | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/CustomActionCycle.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/CustomActionCycle.wxs new file mode 100644 index 00000000..56c07eb9 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/CustomActionCycle.wxs | |||
| @@ -0,0 +1,19 @@ | |||
| 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 | <Binary Id="Binary1" SourceFile="test.txt" /> | ||
| 9 | <CustomAction Id="Action1" BinaryKey="Binary1" DllEntry="EntryPoint1" /> | ||
| 10 | <CustomAction Id="Action2" BinaryKey="Binary1" DllEntry="EntryPoint2" /> | ||
| 11 | <CustomAction Id="Action3" BinaryKey="Binary1" DllEntry="EntryPoint3" /> | ||
| 12 | |||
| 13 | <InstallExecuteSequence> | ||
| 14 | <Custom Action="Action1" After="Action2" /> | ||
| 15 | <Custom Action="Action2" After="Action3" /> | ||
| 16 | <Custom Action="Action3" After="Action1" /> | ||
| 17 | </InstallExecuteSequence> | ||
| 18 | </Fragment> | ||
| 19 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index c86a691f..44ff5bca 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | <Content Include="TestData\Class\DecompiledOldClassTableDef.wxs" CopyToOutputDirectory="PreserveNewest" /> | 33 | <Content Include="TestData\Class\DecompiledOldClassTableDef.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 34 | <Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" /> | 34 | <Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 35 | <Content Include="TestData\Class\OldClassTableDef.msi" CopyToOutputDirectory="PreserveNewest" /> | 35 | <Content Include="TestData\Class\OldClassTableDef.msi" CopyToOutputDirectory="PreserveNewest" /> |
| 36 | <Content Include="TestData\CustomAction\CustomActionCycle.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 36 | <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" /> | 37 | <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 37 | <Content Include="TestData\CustomTable\CustomTable-Expected.wxs" CopyToOutputDirectory="PreserveNewest" /> | 38 | <Content Include="TestData\CustomTable\CustomTable-Expected.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 38 | <Content Include="TestData\CustomTable\CustomTableWithFile.wxs" CopyToOutputDirectory="PreserveNewest" /> | 39 | <Content Include="TestData\CustomTable\CustomTableWithFile.wxs" CopyToOutputDirectory="PreserveNewest" /> |
