From d1ef3d5de29cdedce930f70e34b0e2b764f07269 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 30 Sep 2019 10:26:16 +1000 Subject: Add failing test for LockPermissions when Permissions is 0. --- .../MsiQueryFixture.cs | 33 ++++++++++++++++++++++ .../TestData/LockPermissions/EmptyPermissions.wxs | 13 +++++++++ .../WixToolsetTest.CoreIntegration.csproj | 1 + 3 files changed, 47 insertions(+) create mode 100644 src/test/WixToolsetTest.CoreIntegration/TestData/LockPermissions/EmptyPermissions.wxs (limited to 'src') diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index fb42d8fc..01f30825 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs @@ -308,6 +308,39 @@ namespace WixToolsetTest.CoreIntegration } } + [Fact(Skip = "Test demonstrates failure")] + public void PopulatesLockPermissionsTableWithEmptyPermissions() + { + 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, "LockPermissions", "EmptyPermissions.wxs"), + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.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[] { "LockPermissions" }); + Assert.Equal(new[] + { + "LockPermissions:INSTALLFOLDER\tCreateFolder\t\tAdministrator\t0", + }, results); + } + } + [Fact(Skip = "Test demonstrates failure")] public void PopulatesUpgradeTableFromManualUpgrade() { diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/LockPermissions/EmptyPermissions.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/LockPermissions/EmptyPermissions.wxs new file mode 100644 index 00000000..dfae2157 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/LockPermissions/EmptyPermissions.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 1bbf2aab..a8284a95 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj @@ -24,6 +24,7 @@ + -- cgit v1.2.3-55-g6feb