@joebigelow / wix / commits / cc17da12

Add failing test for nesting a ProgId under an advertised Class.

Sean Hall committed Sep 30, 2019 at 11:05 UTC cc17da12830c5707949bfb4a9cd916b3e05eb5bc
3 files changed +51
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+37
@@ -146,6 +146,43 @@ namespace WixToolsetTest.CoreIntegration
146 }
147 }
148
149 + [Fact(Skip = "Test demonstrates failure")]
150 + public void PopulatesClassTablesWhenProgIdIsNestedUnderAdvertisedClass()
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, "ProgId", "NestedUnderClass.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[] { "Class", "ProgId", "Registry" });
175 + Assert.Equal(new[]
176 + {
177 + "Class:{F12A6F69-117F-471F-AE73-F8E74218F498}\tLocalServer32\tProgIdComp\t73E7DF7E-EFAC-4E11-90E2-6EBAEB8DE58D\tFakeClassF12A\t\t\t\t\t\t\tProductFeature\t",
178 + "ProgId:73E7DF7E-EFAC-4E11-90E2-6EBAEB8DE58D\t\t{F12A6F69-117F-471F-AE73-F8E74218F498}\tFakeClassF12A\t\t",
179 + "Registry:regUIIK326nDZpkWHuexeF58EikQvA\t0\t73E7DF7E-EFAC-4E11-90E2-6EBAEB8DE58D\tNoOpen\tNoOpen73E7\tProgIdComp",
180 + "Registry:regvrhMurMp98anbQJkpgA8yJCefdM\t0\tCLSID\\{F12A6F69-117F-471F-AE73-F8E74218F498}\\Version\t\t0.0.0.1\tProgIdComp",
181 + "Registry:regY1F4E2lvu_Up6gV6c3jeN5ukn8s\t0\tCLSID\\{F12A6F69-117F-471F-AE73-F8E74218F498}\\LocalServer32\tThreadingModel\tApartment\tProgIdComp",
182 + }, results);
183 + }
184 + }
185 +
186 [Fact(Skip = "Test demonstrates failure")]
187 public void PopulatesCustomActionTable()
188 {
src/test/WixToolsetTest.CoreIntegration/TestData/ProgId/NestedUnderClass.wxs new
+13
@@ -0,0 +1,13 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <ComponentGroup Id="ProductComponents">
5 + <Component Id="ProgIdComp" Directory="INSTALLFOLDER" Guid="5B3B3FC1-533D-4C29-BFB3-0E88B51E59D8">
6 + <File Source="test.txt" Name="ProgIdComp.txt"></File>
7 + <Class Id="F12A6F69-117F-471F-AE73-F8E74218F498" Advertise="yes" Context="LocalServer32" Description="FakeClassF12A" ThreadingModel="apartment" Version="0.0.0.1">
8 + <ProgId Id="73E7DF7E-EFAC-4E11-90E2-6EBAEB8DE58D" NoOpen="NoOpen73E7" />
9 + </Class>
10 + </Component>
11 + </ComponentGroup>
12 + </Fragment>
13 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -101,6 +101,7 @@
101 <Content Include="TestData\Wixipl\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
102 <Content Include="TestData\Wixipl\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
103 <Content Include="TestData\ProgId\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
104 + <Content Include="TestData\ProgId\NestedUnderClass.wxs" CopyToOutputDirectory="PreserveNewest" />
105 <Content Include="TestData\ProgId\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
106 <Content Include="TestData\ProgId\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
107 <Content Include="TestData\ProgId\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />