diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-10-15 10:07:00 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-10-15 11:20:07 +1000 |
commit | 9dbf5fbb89d146f1ced4a36072a66b9a24fb9015 (patch) | |
tree | 2287ab7018f270f8ca88b21f7655a7d751864eee /src/test | |
parent | 5ee3e62691e09ffd3edc9bfafa4deddb26f155c5 (diff) | |
download | wix-9dbf5fbb89d146f1ced4a36072a66b9a24fb9015.tar.gz wix-9dbf5fbb89d146f1ced4a36072a66b9a24fb9015.tar.bz2 wix-9dbf5fbb89d146f1ced4a36072a66b9a24fb9015.zip |
Add failing test for Class when IconIndex is 0.
Diffstat (limited to 'src/test')
4 files changed, 54 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index bbce87cd..d5dcba54 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
@@ -147,6 +147,41 @@ namespace WixToolsetTest.CoreIntegration | |||
147 | } | 147 | } |
148 | 148 | ||
149 | [Fact(Skip = "Test demonstrates failure")] | 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")] | ||
150 | public void PopulatesClassTablesWhenProgIdIsNestedUnderAdvertisedClass() | 185 | public void PopulatesClassTablesWhenProgIdIsNestedUnderAdvertisedClass() |
151 | { | 186 | { |
152 | var folder = TestData.Get(@"TestData"); | 187 | var folder = TestData.Get(@"TestData"); |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/Class/IconIndex0.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/Class/IconIndex0.wxs new file mode 100644 index 00000000..c0dc9bc0 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/Class/IconIndex0.wxs | |||
@@ -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> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/Icon/SampleIcon.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/Icon/SampleIcon.wxs new file mode 100644 index 00000000..1de84e81 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/Icon/SampleIcon.wxs | |||
@@ -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> | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index f9d1f5c5..f0b2e271 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
@@ -18,6 +18,7 @@ | |||
18 | <Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 18 | <Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
19 | <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 19 | <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
20 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 20 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
21 | <Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
21 | <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" /> | 22 | <Content Include="TestData\CustomAction\UnscheduledCustomAction.wxs" CopyToOutputDirectory="PreserveNewest" /> |
22 | <Content Include="TestData\CustomTable\CustomTable.wxs" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\CustomTable\CustomTable.wxs" CopyToOutputDirectory="PreserveNewest" /> |
23 | <Content Include="TestData\DefaultDir\DefaultDir.wxs" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\DefaultDir\DefaultDir.wxs" CopyToOutputDirectory="PreserveNewest" /> |
@@ -27,6 +28,7 @@ | |||
27 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | 28 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> |
28 | <Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> | 29 | <Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> |
29 | <Content Include="TestData\Font\FontTitle.wxs" CopyToOutputDirectory="PreserveNewest" /> | 30 | <Content Include="TestData\Font\FontTitle.wxs" CopyToOutputDirectory="PreserveNewest" /> |
31 | <Content Include="TestData\Icon\SampleIcon.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
30 | <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" /> | 32 | <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" /> |
31 | <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> | 33 | <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> |
32 | <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> | 34 | <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> |