aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-12-19 14:23:44 -0600
committerSean Hall <r.sean.hall@gmail.com>2020-12-19 21:32:39 -0600
commit149867e176f22fe0af1a57355a7ace820710a791 (patch)
treeb4719d0fe980bc78398c1717b3683f33afb6e1c8
parent0e71bdd637a6b3c34f18d4b3630d55fa4cdfd2a3 (diff)
downloadwix-149867e176f22fe0af1a57355a7ace820710a791.tar.gz
wix-149867e176f22fe0af1a57355a7ace820710a791.tar.bz2
wix-149867e176f22fe0af1a57355a7ace820710a791.zip
Add more failing tests and label them with the issue number.
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs56
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs2
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/RegistryFixture.cs39
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledPackage.wxs16
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledRollbackBoundary.wxs16
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/TestData/Registry/RegistryKeyEndingWithBackslash.wxs12
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj3
7 files changed, 138 insertions, 6 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
index ad1648e6..1e3f1e24 100644
--- a/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
@@ -245,7 +245,7 @@ namespace WixToolsetTest.CoreIntegration
245 } 245 }
246 } 246 }
247 247
248 [Fact(Skip = "Test demonstrates failure")] 248 [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4628
249 public void CantBuildWithDuplicateCacheIds() 249 public void CantBuildWithDuplicateCacheIds()
250 { 250 {
251 var folder = TestData.Get(@"TestData"); 251 var folder = TestData.Get(@"TestData");
@@ -271,7 +271,7 @@ namespace WixToolsetTest.CoreIntegration
271 } 271 }
272 } 272 }
273 273
274 [Fact(Skip = "Test demonstrates failure")] 274 [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4574
275 public void CantBuildWithDuplicatePayloadNames() 275 public void CantBuildWithDuplicatePayloadNames()
276 { 276 {
277 var folder = TestData.Get(@"TestData"); 277 var folder = TestData.Get(@"TestData");
@@ -296,5 +296,57 @@ namespace WixToolsetTest.CoreIntegration
296 Assert.InRange(result.ExitCode, 2, Int32.MaxValue); 296 Assert.InRange(result.ExitCode, 2, Int32.MaxValue);
297 } 297 }
298 } 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 }
299 } 351 }
300} 352}
diff --git a/src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs b/src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs
index 967c38f8..00088fb9 100644
--- a/src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs
@@ -11,7 +11,7 @@ namespace WixToolsetTest.CoreIntegration
11 11
12 public class CustomActionFixture 12 public class CustomActionFixture
13 { 13 {
14 [Fact(Skip = "Test demonstrates failure")] 14 [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/6201
15 public void CanDetectCustomActionCycle() 15 public void CanDetectCustomActionCycle()
16 { 16 {
17 var folder = TestData.Get(@"TestData"); 17 var folder = TestData.Get(@"TestData");
diff --git a/src/test/WixToolsetTest.CoreIntegration/RegistryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/RegistryFixture.cs
index 699155d4..3b13d8f5 100644
--- a/src/test/WixToolsetTest.CoreIntegration/RegistryFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/RegistryFixture.cs
@@ -39,7 +39,7 @@ namespace WixToolsetTest.CoreIntegration
39 39
40 Assert.True(File.Exists(msiPath)); 40 Assert.True(File.Exists(msiPath));
41 var results = Query.QueryDatabase(msiPath, new[] { "Registry" }); 41 var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
42 Assert.Equal(new[] 42 WixAssert.CompareLineByLine(new[]
43 { 43 {
44 "Registry:reg04OIwIchl.9ZTjisTT6NzGSsQSM\t2\tPath\\To\\AnotherKey\tSecret\t#x\tMiscComponent", 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", 45 "Registry:regEblTuusqFNSUQNy88zaP_UA5kIY\t2\tPath\\To\\Key\t\t1.0.1234.123\tMiscComponent",
@@ -71,7 +71,7 @@ namespace WixToolsetTest.CoreIntegration
71 result.AssertSuccess(); 71 result.AssertSuccess();
72 72
73 var results = Query.QueryDatabase(msiPath, new[] { "Registry" }); 73 var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
74 Assert.Equal(new[] 74 WixAssert.CompareLineByLine(new[]
75 { 75 {
76 "Registry:regitq_Wx9LfvJuNSc2un6gIHAzr4A\t2\tPath\\To\\AnotherKey\tSecret\t#x\tMultiStringComponent", 76 "Registry:regitq_Wx9LfvJuNSc2un6gIHAzr4A\t2\tPath\\To\\AnotherKey\tSecret\t#x\tMultiStringComponent",
77 "Registry:regmeTJMpOD41igfxhTcUVZ7kNG1Mo\t2\tPath\\To\\Key\t\ta[~]b[~][~]c[~]\tMultiStringComponent", 77 "Registry:regmeTJMpOD41igfxhTcUVZ7kNG1Mo\t2\tPath\\To\\Key\t\ta[~]b[~][~]c[~]\tMultiStringComponent",
@@ -104,11 +104,44 @@ namespace WixToolsetTest.CoreIntegration
104 104
105 Assert.True(File.Exists(msiPath)); 105 Assert.True(File.Exists(msiPath));
106 var results = Query.QueryDatabase(msiPath, new[] { "Registry" }); 106 var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
107 Assert.Equal(new[] 107 WixAssert.CompareLineByLine(new[]
108 { 108 {
109 "Registry:RemoveAKeyName\t2\tAKeyName\t-\t\tRemoveRegistryKeyComp", 109 "Registry:RemoveAKeyName\t2\tAKeyName\t-\t\tRemoveRegistryKeyComp",
110 }, results); 110 }, results);
111 } 111 }
112 } 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 }
113 } 146 }
114} 147}
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledPackage.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledPackage.wxs
new file mode 100644
index 00000000..ab86982d
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledPackage.wxs
@@ -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>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledRollbackBoundary.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledRollbackBoundary.wxs
new file mode 100644
index 00000000..8015ed92
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledRollbackBoundary.wxs
@@ -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>
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/Registry/RegistryKeyEndingWithBackslash.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/Registry/RegistryKeyEndingWithBackslash.wxs
new file mode 100644
index 00000000..1fb2e906
--- /dev/null
+++ b/src/test/WixToolsetTest.CoreIntegration/TestData/Registry/RegistryKeyEndingWithBackslash.wxs
@@ -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>
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
index b6ab1e03..8680bb8a 100644
--- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
@@ -22,6 +22,8 @@
22 <Content Include="TestData\BadInput\DuplicateCacheIds.wxs" CopyToOutputDirectory="PreserveNewest" /> 22 <Content Include="TestData\BadInput\DuplicateCacheIds.wxs" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\BadInput\DuplicatePayloadNames.wxs" CopyToOutputDirectory="PreserveNewest" /> 23 <Content Include="TestData\BadInput\DuplicatePayloadNames.wxs" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\BadInput\RegistryKey.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" />
25 <Content Include="TestData\BindVariables\DefaultedVariable.wxs" CopyToOutputDirectory="PreserveNewest" /> 27 <Content Include="TestData\BindVariables\DefaultedVariable.wxs" CopyToOutputDirectory="PreserveNewest" />
26 <Content Include="TestData\BindVariables\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> 28 <Content Include="TestData\BindVariables\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
27 <Content Include="TestData\BundleCustomTable\BundleCustomTable.wxs" CopyToOutputDirectory="PreserveNewest" /> 29 <Content Include="TestData\BundleCustomTable\BundleCustomTable.wxs" CopyToOutputDirectory="PreserveNewest" />
@@ -87,6 +89,7 @@
87 <Content Include="TestData\SameFileFolders\TestComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> 89 <Content Include="TestData\SameFileFolders\TestComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
88 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> 90 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
89 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> 91 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
92 <Content Include="TestData\Registry\RegistryKeyEndingWithBackslash.wxs" CopyToOutputDirectory="PreserveNewest" />
90 <Content Include="TestData\Registry\RegistryValue.wxs" CopyToOutputDirectory="PreserveNewest" /> 93 <Content Include="TestData\Registry\RegistryValue.wxs" CopyToOutputDirectory="PreserveNewest" />
91 <Content Include="TestData\Registry\RegistryValueMultiString.wxs" CopyToOutputDirectory="PreserveNewest" /> 94 <Content Include="TestData\Registry\RegistryValueMultiString.wxs" CopyToOutputDirectory="PreserveNewest" />
92 <Content Include="TestData\Registry\RemoveRegistryKey.wxs" CopyToOutputDirectory="PreserveNewest" /> 95 <Content Include="TestData\Registry\RemoveRegistryKey.wxs" CopyToOutputDirectory="PreserveNewest" />