@joebigelow / wix-1 / commits / 664ce5ac

Add failing test for CustomTable.

Sean Hall committed Oct 11, 2019 at 14:59 UTC 664ce5ac707905b631f9a752cab0d2dc1b7d6edc
3 files changed +56
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+34
@@ -217,6 +217,40 @@ namespace WixToolsetTest.CoreIntegration
217 }
218 }
219
220 + [Fact(Skip = "Test demonstrates failure")]
221 + public void PopulatesCustomTable1()
222 + {
223 + var folder = TestData.Get(@"TestData");
224 +
225 + using (var fs = new DisposableFileSystem())
226 + {
227 + var baseFolder = fs.GetFolder();
228 + var intermediateFolder = Path.Combine(baseFolder, "obj");
229 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
230 +
231 + var result = WixRunner.Execute(new[]
232 + {
233 + "build",
234 + Path.Combine(folder, "CustomTable", "CustomTable.wxs"),
235 + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
236 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
237 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
238 + "-intermediateFolder", intermediateFolder,
239 + "-o", msiPath
240 + });
241 +
242 + result.AssertSuccess();
243 +
244 + Assert.True(File.Exists(msiPath));
245 + var results = Query.QueryDatabase(msiPath, new[] { "CustomTable1" });
246 + Assert.Equal(new[]
247 + {
248 + "CustomTable1:Row1\ttest.txt",
249 + "CustomTable1:Row2\ttest.txt",
250 + }, results);
251 + }
252 + }
253 +
254 [Fact]
255 public void PopulatesDirectoryTableWithValidDefaultDir()
256 {
src/test/WixToolsetTest.CoreIntegration/TestData/CustomTable/CustomTable.wxs new
+21
@@ -0,0 +1,21 @@
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 + <CustomTable Id="CustomTable1">
9 + <Column Id="Column1" Type="string" PrimaryKey="yes" />
10 + <Column Id="Component_" Type="string" Width="72" KeyTable="Component" KeyColumn="1" />
11 + <Row>
12 + <Data Column="Column1">Row1</Data>
13 + <Data Column="Component_">test.txt</Data>
14 + </Row>
15 + <Row>
16 + <Data Column="Column1">Row2</Data>
17 + <Data Column="Component_">test.txt</Data>
18 + </Row>
19 + </CustomTable>
20 + </Fragment>
21 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -19,6 +19,7 @@
19 <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
21 <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" />
22 + <Content Include="TestData\CustomTable\CustomTable.wxs" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\DefaultDir\DefaultDir.wxs" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\DialogsInInstallUISequence\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
25 <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />