@joebigelow / wix / commits / 9dbf5fbb

Add failing test for Class when IconIndex is 0.

Sean Hall committed Oct 15, 2019 at 10:07 UTC 9dbf5fbb89d146f1ced4a36072a66b9a24fb9015
4 files changed +54
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+35
@@ -146,6 +146,41 @@ namespace WixToolsetTest.CoreIntegration
146 }
147 }
148
149 + [Fact(Skip = "Test demonstrates failure")]
150 + public void PopulatesClassTablesWhenIconIndexIsZero()
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, "Class", "IconIndex0.wxs"),
164 + Path.Combine(folder, "Icon", "SampleIcon.wxs"),
165 + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
166 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
167 + "-bindpath", Path.Combine(folder, ".Data"),
168 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
169 + "-intermediateFolder", intermediateFolder,
170 + "-o", msiPath
171 + });
172 +
173 + result.AssertSuccess();
174 +
175 + Assert.True(File.Exists(msiPath));
176 + var results = Query.QueryDatabase(msiPath, new[] { "Class" });
177 + Assert.Equal(new[]
178 + {
179 + "Class:{3FAED4CC-C473-4B8A-BE8B-303871377A4A}\tLocalServer32\tClassComp\t\tFakeClass3FAE\t\t\tSampleIcon\t0\t\t\tProductFeature\t",
180 + }, results);
181 + }
182 + }
183 +
184 [Fact(Skip = "Test demonstrates failure")]
185 public void PopulatesClassTablesWhenProgIdIsNestedUnderAdvertisedClass()
186 {
src/test/WixToolsetTest.CoreIntegration/TestData/Class/IconIndex0.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 + <Component Id="ClassComp" Directory="INSTALLFOLDER" Guid="9BFDA7DC-CA16-40B3-A6B5-961E60B30892">
6 + <File Source="test.txt" Name="ClassComp.txt"></File>
7 + <Class Id="3FAED4CC-C473-4B8A-BE8B-303871377A4A" Advertise="yes" Context="LocalServer32" Description="FakeClass3FAE" ThreadingModel="apartment" Version="0.0.0.1" Icon="SampleIcon" IconIndex="0" />
8 + </Component>
9 + </ComponentGroup>
10 + </Fragment>
11 +</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/Icon/SampleIcon.wxs new
+6
@@ -0,0 +1,6 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <Icon Id="SampleIcon" SourceFile="burn.exe" />
5 + </Fragment>
6 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+2
@@ -18,6 +18,7 @@
18 <Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
21 + <Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" />
22 <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\CustomTable\CustomTable.wxs" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\DefaultDir\DefaultDir.wxs" CopyToOutputDirectory="PreserveNewest" />
@@ -27,6 +28,7 @@
28 <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
29 <Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
30 <Content Include="TestData\Font\FontTitle.wxs" CopyToOutputDirectory="PreserveNewest" />
31 + <Content Include="TestData\Icon\SampleIcon.wxs" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" />
33 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
34 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />