@joebigelow / wix / commits / 149867e1

Add more failing tests and label them with the issue number.

Sean Hall committed Dec 19, 2020 at 14:23 UTC 149867e176f22fe0af1a57355a7ace820710a791
7 files changed +138 -6
src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+54 -2
@@ -245,7 +245,7 @@ namespace WixToolsetTest.CoreIntegration
245 }
246 }
247
248 - [Fact(Skip = "Test demonstrates failure")]
248 + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4628
249 public void CantBuildWithDuplicateCacheIds()
250 {
251 var folder = TestData.Get(@"TestData");
@@ -271,7 +271,7 @@ namespace WixToolsetTest.CoreIntegration
271 }
272 }
273
274 - [Fact(Skip = "Test demonstrates failure")]
274 + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4574
275 public void CantBuildWithDuplicatePayloadNames()
276 {
277 var folder = TestData.Get(@"TestData");
@@ -296,5 +296,57 @@ namespace WixToolsetTest.CoreIntegration
296 Assert.InRange(result.ExitCode, 2, Int32.MaxValue);
297 }
298 }
299 +
300 + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/6291
301 + public void CantBuildWithUnscheduledPackage()
302 + {
303 + var folder = TestData.Get(@"TestData");
304 +
305 + using (var fs = new DisposableFileSystem())
306 + {
307 + var baseFolder = fs.GetFolder();
308 + var intermediateFolder = Path.Combine(baseFolder, "obj");
309 + var exePath = Path.Combine(baseFolder, @"bin\test.exe");
310 +
311 + var result = WixRunner.Execute(new[]
312 + {
313 + "build",
314 + Path.Combine(folder, "BadInput", "UnscheduledPackage.wxs"),
315 + Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
316 + "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
317 + "-bindpath", Path.Combine(folder, ".Data"),
318 + "-intermediateFolder", intermediateFolder,
319 + "-o", exePath,
320 + });
321 +
322 + Assert.InRange(result.ExitCode, 2, Int32.MaxValue);
323 + }
324 + }
325 +
326 + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/6291
327 + public void CantBuildWithUnscheduledRollbackBoundary()
328 + {
329 + var folder = TestData.Get(@"TestData");
330 +
331 + using (var fs = new DisposableFileSystem())
332 + {
333 + var baseFolder = fs.GetFolder();
334 + var intermediateFolder = Path.Combine(baseFolder, "obj");
335 + var exePath = Path.Combine(baseFolder, @"bin\test.exe");
336 +
337 + var result = WixRunner.Execute(new[]
338 + {
339 + "build",
340 + Path.Combine(folder, "BadInput", "UnscheduledRollbackBoundary.wxs"),
341 + Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
342 + "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
343 + "-bindpath", Path.Combine(folder, ".Data"),
344 + "-intermediateFolder", intermediateFolder,
345 + "-o", exePath,
346 + });
347 +
348 + Assert.InRange(result.ExitCode, 2, Int32.MaxValue);
349 + }
350 + }
351 }
352 }
src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs
+1 -1
@@ -11,7 +11,7 @@ namespace WixToolsetTest.CoreIntegration
11
12 public class CustomActionFixture
13 {
14 - [Fact(Skip = "Test demonstrates failure")]
14 + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/6201
15 public void CanDetectCustomActionCycle()
16 {
17 var folder = TestData.Get(@"TestData");
src/test/WixToolsetTest.CoreIntegration/RegistryFixture.cs
+36 -3
@@ -39,7 +39,7 @@ namespace WixToolsetTest.CoreIntegration
39
40 Assert.True(File.Exists(msiPath));
41 var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
42 - Assert.Equal(new[]
42 + WixAssert.CompareLineByLine(new[]
43 {
44 "Registry:reg04OIwIchl.9ZTjisTT6NzGSsQSM\t2\tPath\\To\\AnotherKey\tSecret\t#x\tMiscComponent",
45 "Registry:regEblTuusqFNSUQNy88zaP_UA5kIY\t2\tPath\\To\\Key\t\t1.0.1234.123\tMiscComponent",
@@ -71,7 +71,7 @@ namespace WixToolsetTest.CoreIntegration
71 result.AssertSuccess();
72
73 var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
74 - Assert.Equal(new[]
74 + WixAssert.CompareLineByLine(new[]
75 {
76 "Registry:regitq_Wx9LfvJuNSc2un6gIHAzr4A\t2\tPath\\To\\AnotherKey\tSecret\t#x\tMultiStringComponent",
77 "Registry:regmeTJMpOD41igfxhTcUVZ7kNG1Mo\t2\tPath\\To\\Key\t\ta[~]b[~][~]c[~]\tMultiStringComponent",
@@ -104,11 +104,44 @@ namespace WixToolsetTest.CoreIntegration
104
105 Assert.True(File.Exists(msiPath));
106 var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
107 - Assert.Equal(new[]
107 + WixAssert.CompareLineByLine(new[]
108 {
109 "Registry:RemoveAKeyName\t2\tAKeyName\t-\t\tRemoveRegistryKeyComp",
110 }, results);
111 }
112 }
113 +
114 + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4753
115 + public void PopulatesRegistryTableWithoutExtraBackslash()
116 + {
117 + var folder = TestData.Get(@"TestData");
118 +
119 + using (var fs = new DisposableFileSystem())
120 + {
121 + var baseFolder = fs.GetFolder();
122 + var intermediateFolder = Path.Combine(baseFolder, "obj");
123 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
124 +
125 + var result = WixRunner.Execute(new[]
126 + {
127 + "build",
128 + Path.Combine(folder, "Registry", "RegistryKeyEndingWithBackslash.wxs"),
129 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
130 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
131 + "-intermediateFolder", intermediateFolder,
132 + "-o", msiPath
133 + });
134 +
135 + result.AssertSuccess();
136 +
137 + Assert.True(File.Exists(msiPath));
138 + var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
139 + WixAssert.CompareLineByLine(new[]
140 + {
141 + "Registry:reg1\t2\tSoftware\\WBM\\WB\t*\t\tMiscComponent",
142 + "Registry:reg2\t2\tSoftware\\WBM\\WB\tInstallationPath\t[INSTALLFOLDER]\tMiscComponent",
143 + }, results);
144 + }
145 + }
146 }
147 }
src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledPackage.wxs new
+16
@@ -0,0 +1,16 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <PackageGroup Id="BundlePackages">
5 + <ExePackage Id="Auto1" SourceFile="burn.exe" CacheId="Auto1" />
6 + <ExePackage Id="Auto2" SourceFile="burn.exe" CacheId="Auto2" />
7 + </PackageGroup>
8 + <SetVariableRef Id="Dummy" />
9 + </Fragment>
10 + <Fragment>
11 + <SetVariable Id="Dummy" Variable="Dummy" />
12 + <PackageGroup Id="Unscheduled">
13 + <ExePackage Id="Unscheduled1" SourceFile="burn.exe" CacheId="Unscheduled1" />
14 + </PackageGroup>
15 + </Fragment>
16 +</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledRollbackBoundary.wxs new
+16
@@ -0,0 +1,16 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <PackageGroup Id="BundlePackages">
5 + <ExePackage Id="Auto1" SourceFile="burn.exe" CacheId="Auto1" />
6 + <ExePackage Id="Auto2" SourceFile="burn.exe" CacheId="Auto2" />
7 + </PackageGroup>
8 + <SetVariableRef Id="Dummy" />
9 + </Fragment>
10 + <Fragment>
11 + <SetVariable Id="Dummy" Variable="Dummy" />
12 + <PackageGroup Id="Unscheduled">
13 + <RollbackBoundary Id="Unscheduled1" />
14 + </PackageGroup>
15 + </Fragment>
16 +</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/Registry/RegistryKeyEndingWithBackslash.wxs new
+12
@@ -0,0 +1,12 @@
1 +<?xml version="1.0" encoding="utf-8" ?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
5 + <Component Id="MiscComponent" Guid="7C40C257-AB36-4B8C-8FD1-C56E0AC4AAEF">
6 + <RegistryKey Id="reg1" Root="HKLM" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Key="Software\WBM\WB\">
7 + <RegistryValue Id="reg2" Type="string" Name="InstallationPath" Value="[INSTALLFOLDER]" />
8 + </RegistryKey>
9 + </Component>
10 + </ComponentGroup>
11 + </Fragment>
12 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+3
@@ -22,6 +22,8 @@
22 <Content Include="TestData\BadInput\DuplicateCacheIds.wxs" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\BadInput\DuplicatePayloadNames.wxs" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\BadInput\RegistryKey.wxs" CopyToOutputDirectory="PreserveNewest" />
25 + <Content Include="TestData\BadInput\UnscheduledPackage.wxs" CopyToOutputDirectory="PreserveNewest" />
26 + <Content Include="TestData\BadInput\UnscheduledRollbackBoundary.wxs" CopyToOutputDirectory="PreserveNewest" />
27 <Content Include="TestData\BindVariables\DefaultedVariable.wxs" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\BindVariables\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
29 <Content Include="TestData\BundleCustomTable\BundleCustomTable.wxs" CopyToOutputDirectory="PreserveNewest" />
@@ -87,6 +89,7 @@
89 <Content Include="TestData\SameFileFolders\TestComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
90 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
91 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
92 + <Content Include="TestData\Registry\RegistryKeyEndingWithBackslash.wxs" CopyToOutputDirectory="PreserveNewest" />
93 <Content Include="TestData\Registry\RegistryValue.wxs" CopyToOutputDirectory="PreserveNewest" />
94 <Content Include="TestData\Registry\RegistryValueMultiString.wxs" CopyToOutputDirectory="PreserveNewest" />
95 <Content Include="TestData\Registry\RemoveRegistryKey.wxs" CopyToOutputDirectory="PreserveNewest" />