From 149867e176f22fe0af1a57355a7ace820710a791 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 19 Dec 2020 14:23:44 -0600 Subject: Add more failing tests and label them with the issue number. --- .../BundleFixture.cs | 56 +++++++++++++++++++++- .../CustomActionFixture.cs | 2 +- .../RegistryFixture.cs | 39 +++++++++++++-- .../TestData/BadInput/UnscheduledPackage.wxs | 16 +++++++ .../BadInput/UnscheduledRollbackBoundary.wxs | 16 +++++++ .../Registry/RegistryKeyEndingWithBackslash.wxs | 12 +++++ .../WixToolsetTest.CoreIntegration.csproj | 3 ++ 7 files changed, 138 insertions(+), 6 deletions(-) create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledPackage.wxs create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledRollbackBoundary.wxs create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/Registry/RegistryKeyEndingWithBackslash.wxs (limited to 'src') 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 } } - [Fact(Skip = "Test demonstrates failure")] + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4628 public void CantBuildWithDuplicateCacheIds() { var folder = TestData.Get(@"TestData"); @@ -271,7 +271,7 @@ namespace WixToolsetTest.CoreIntegration } } - [Fact(Skip = "Test demonstrates failure")] + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4574 public void CantBuildWithDuplicatePayloadNames() { var folder = TestData.Get(@"TestData"); @@ -296,5 +296,57 @@ namespace WixToolsetTest.CoreIntegration Assert.InRange(result.ExitCode, 2, Int32.MaxValue); } } + + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/6291 + public void CantBuildWithUnscheduledPackage() + { + var folder = TestData.Get(@"TestData"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var exePath = Path.Combine(baseFolder, @"bin\test.exe"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "BadInput", "UnscheduledPackage.wxs"), + Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), + "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), + "-bindpath", Path.Combine(folder, ".Data"), + "-intermediateFolder", intermediateFolder, + "-o", exePath, + }); + + Assert.InRange(result.ExitCode, 2, Int32.MaxValue); + } + } + + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/6291 + public void CantBuildWithUnscheduledRollbackBoundary() + { + var folder = TestData.Get(@"TestData"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var exePath = Path.Combine(baseFolder, @"bin\test.exe"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "BadInput", "UnscheduledRollbackBoundary.wxs"), + Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), + "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), + "-bindpath", Path.Combine(folder, ".Data"), + "-intermediateFolder", intermediateFolder, + "-o", exePath, + }); + + Assert.InRange(result.ExitCode, 2, Int32.MaxValue); + } + } } } 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 public class CustomActionFixture { - [Fact(Skip = "Test demonstrates failure")] + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/6201 public void CanDetectCustomActionCycle() { 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 Assert.True(File.Exists(msiPath)); var results = Query.QueryDatabase(msiPath, new[] { "Registry" }); - Assert.Equal(new[] + WixAssert.CompareLineByLine(new[] { "Registry:reg04OIwIchl.9ZTjisTT6NzGSsQSM\t2\tPath\\To\\AnotherKey\tSecret\t#x\tMiscComponent", "Registry:regEblTuusqFNSUQNy88zaP_UA5kIY\t2\tPath\\To\\Key\t\t1.0.1234.123\tMiscComponent", @@ -71,7 +71,7 @@ namespace WixToolsetTest.CoreIntegration result.AssertSuccess(); var results = Query.QueryDatabase(msiPath, new[] { "Registry" }); - Assert.Equal(new[] + WixAssert.CompareLineByLine(new[] { "Registry:regitq_Wx9LfvJuNSc2un6gIHAzr4A\t2\tPath\\To\\AnotherKey\tSecret\t#x\tMultiStringComponent", "Registry:regmeTJMpOD41igfxhTcUVZ7kNG1Mo\t2\tPath\\To\\Key\t\ta[~]b[~][~]c[~]\tMultiStringComponent", @@ -104,11 +104,44 @@ namespace WixToolsetTest.CoreIntegration Assert.True(File.Exists(msiPath)); var results = Query.QueryDatabase(msiPath, new[] { "Registry" }); - Assert.Equal(new[] + WixAssert.CompareLineByLine(new[] { "Registry:RemoveAKeyName\t2\tAKeyName\t-\t\tRemoveRegistryKeyComp", }, results); } } + + [Fact(Skip = "Test demonstrates failure")] //https://github.com/wixtoolset/issues/issues/4753 + public void PopulatesRegistryTableWithoutExtraBackslash() + { + var folder = TestData.Get(@"TestData"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "Registry", "RegistryKeyEndingWithBackslash.wxs"), + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), + "-bindpath", Path.Combine(folder, "SingleFile", "data"), + "-intermediateFolder", intermediateFolder, + "-o", msiPath + }); + + result.AssertSuccess(); + + Assert.True(File.Exists(msiPath)); + var results = Query.QueryDatabase(msiPath, new[] { "Registry" }); + WixAssert.CompareLineByLine(new[] + { + "Registry:reg1\t2\tSoftware\\WBM\\WB\t*\t\tMiscComponent", + "Registry:reg2\t2\tSoftware\\WBM\\WB\tInstallationPath\t[INSTALLFOLDER]\tMiscComponent", + }, results); + } + } } } 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 @@ + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + + + 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 @@ + + @@ -87,6 +89,7 @@ + -- cgit v1.2.3-55-g6feb