@joebigelow / wix-1 / commits / a96ae75e

Add failing test for CustomAction.

Sean Hall committed Sep 30, 2019 at 10:01 UTC a96ae75e256712829ac2174688c71e6a14ba1943
3 files changed +46
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+34
@@ -146,6 +146,40 @@ namespace WixToolsetTest.CoreIntegration
146 }
147 }
148
149 + [Fact(Skip = "Test demonstrates failure")]
150 + public void PopulatesCustomActionTable()
151 + {
152 + var folder = TestData.Get(@"TestData");
153 +
154 + using (var fs = new DisposableFileSystem())
155 + {
156 + var baseFolder = fs.GetFolder();
157 + var intermediateFolder = Path.Combine(baseFolder, "obj");
158 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
159 +
160 + var result = WixRunner.Execute(new[]
161 + {
162 + "build",
163 + Path.Combine(folder, "CustomAction", "UnscheduledCustomAction.wxs"),
164 + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
165 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
166 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
167 + "-intermediateFolder", intermediateFolder,
168 + "-o", msiPath
169 + });
170 +
171 + result.AssertSuccess();
172 +
173 + Assert.True(File.Exists(msiPath));
174 + var results = Query.QueryDatabase(msiPath, new[] { "Binary", "CustomAction" });
175 + Assert.Equal(new[]
176 + {
177 + "Binary:Binary1\t[Binary data]",
178 + "CustomAction:CustomAction1\t1\tBinary1\tInvalidEntryPoint\t",
179 + }, results);
180 + }
181 + }
182 +
183 [Fact(Skip = "Test demonstrates failure")]
184 public void PopulatesDirectoryTableWithValidDefaultDir()
185 {
src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs new
+11
@@ -0,0 +1,11 @@
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"></ComponentGroupRef>
6 + </ComponentGroup>
7 +
8 + <Binary Id="Binary1" SourceFile="test.txt"></Binary>
9 + <CustomAction Id="CustomAction1" BinaryKey="Binary1" DllEntry="InvalidEntryPoint"></CustomAction>
10 + </Fragment>
11 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -17,6 +17,7 @@
17 <Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
20 + <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" />
21 <Content Include="TestData\DefaultDir\DefaultDir.wxs" CopyToOutputDirectory="PreserveNewest" />
22 <Content Include="TestData\DialogsInInstallUISequence\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />