@joebigelow / wix / commits / a44207c9

Add failing test for FeatureGroup and parent Features.

Sean Hall committed Sep 27, 2019 at 16:51 UTC a44207c9296c3d5d18f07455f919781b88424c54
4 files changed +61
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+35
@@ -50,5 +50,40 @@ namespace WixToolsetTest.CoreIntegration
50 }, results);
51 }
52 }
53 +
54 + [Fact(Skip = "Test demonstrates failure")]
55 + public void PopulatesFeatureTableWithParent()
56 + {
57 + var folder = TestData.Get(@"TestData");
58 +
59 + using (var fs = new DisposableFileSystem())
60 + {
61 + var baseFolder = fs.GetFolder();
62 + var intermediateFolder = Path.Combine(baseFolder, "obj");
63 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
64 +
65 + var result = WixRunner.Execute(new[]
66 + {
67 + "build",
68 + Path.Combine(folder, "FeatureGroup", "FeatureGroup.wxs"),
69 + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
70 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
71 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
72 + "-intermediateFolder", intermediateFolder,
73 + "-o", msiPath
74 + });
75 +
76 + result.AssertSuccess();
77 +
78 + Assert.True(File.Exists(msiPath));
79 + var results = Query.QueryDatabase(msiPath, new[] { "Feature" });
80 + Assert.Equal(new[]
81 + {
82 + "Feature:ChildFeature\tParentFeature\tChildFeatureTitle\t\t2\t1\t\t0",
83 + "Feature:ParentFeature\t\tParentFeatureTitle\t\t2\t1\t\t0",
84 + "Feature:ProductFeature\t\tMsiPackageTitle\t\t2\t1\t\t0",
85 + }, results);
86 + }
87 + }
88 }
89 }
src/test/WixToolsetTest.CoreIntegration/TestData/FeatureGroup/FeatureGroup.wxs new
+14
@@ -0,0 +1,14 @@
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 + <FeatureGroup Id="ProductFeatureGroup">
9 + <Feature Id="ParentFeature" Title="ParentFeatureTitle">
10 + <Feature Id="ChildFeature" Title="ChildFeatureTitle"></Feature>
11 + </Feature>
12 + </FeatureGroup>
13 + </Fragment>
14 +</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/ProductWithComponentGroupRef/MinimalComponentGroup.wxs new
+10
@@ -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="MinimalComponentGroup" Directory="INSTALLFOLDER">
5 + <Component>
6 + <File Source="test.txt" />
7 + </Component>
8 + </ComponentGroup>
9 + </Fragment>
10 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+2
@@ -18,6 +18,8 @@
18 <Content Include="TestData\DialogsInInstallUISequence\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
21 + <Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
22 + <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
25 <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />