diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-09-30 10:26:16 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-09-30 13:14:35 +1000 |
| commit | d1ef3d5de29cdedce930f70e34b0e2b764f07269 (patch) | |
| tree | 4aa39e9bf7bb51a15da7eae2013a815387280e2c /src | |
| parent | a96ae75e256712829ac2174688c71e6a14ba1943 (diff) | |
| download | wix-d1ef3d5de29cdedce930f70e34b0e2b764f07269.tar.gz wix-d1ef3d5de29cdedce930f70e34b0e2b764f07269.tar.bz2 wix-d1ef3d5de29cdedce930f70e34b0e2b764f07269.zip | |
Add failing test for LockPermissions when Permissions is 0.
Diffstat (limited to 'src')
3 files changed, 47 insertions, 0 deletions
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 | |||
| @@ -309,6 +309,39 @@ namespace WixToolsetTest.CoreIntegration | |||
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | [Fact(Skip = "Test demonstrates failure")] | 311 | [Fact(Skip = "Test demonstrates failure")] |
| 312 | public void PopulatesLockPermissionsTableWithEmptyPermissions() | ||
| 313 | { | ||
| 314 | var folder = TestData.Get(@"TestData"); | ||
| 315 | |||
| 316 | using (var fs = new DisposableFileSystem()) | ||
| 317 | { | ||
| 318 | var baseFolder = fs.GetFolder(); | ||
| 319 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 320 | var msiPath = Path.Combine(baseFolder, @"bin\test.msi"); | ||
| 321 | |||
| 322 | var result = WixRunner.Execute(new[] | ||
| 323 | { | ||
| 324 | "build", | ||
| 325 | Path.Combine(folder, "LockPermissions", "EmptyPermissions.wxs"), | ||
| 326 | Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"), | ||
| 327 | Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"), | ||
| 328 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 329 | "-intermediateFolder", intermediateFolder, | ||
| 330 | "-o", msiPath | ||
| 331 | }); | ||
| 332 | |||
| 333 | result.AssertSuccess(); | ||
| 334 | |||
| 335 | Assert.True(File.Exists(msiPath)); | ||
| 336 | var results = Query.QueryDatabase(msiPath, new[] { "LockPermissions" }); | ||
| 337 | Assert.Equal(new[] | ||
| 338 | { | ||
| 339 | "LockPermissions:INSTALLFOLDER\tCreateFolder\t\tAdministrator\t0", | ||
| 340 | }, results); | ||
| 341 | } | ||
| 342 | } | ||
| 343 | |||
| 344 | [Fact(Skip = "Test demonstrates failure")] | ||
| 312 | public void PopulatesUpgradeTableFromManualUpgrade() | 345 | public void PopulatesUpgradeTableFromManualUpgrade() |
| 313 | { | 346 | { |
| 314 | var folder = TestData.Get(@"TestData\ManualUpgrade"); | 347 | var folder = TestData.Get(@"TestData\ManualUpgrade"); |
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 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Fragment> | ||
| 4 | <ComponentGroup Id="ProductComponents"> | ||
| 5 | <ComponentGroupRef Id="MinimalComponentGroup"></ComponentGroupRef> | ||
| 6 | <Component Id="MiscComponent" Guid="D1414BA5-F8DE-4979-938D-C8D0F61A62C9" Directory="INSTALLFOLDER"> | ||
| 7 | <CreateFolder> | ||
| 8 | <Permission User="Administrator"></Permission> | ||
| 9 | </CreateFolder> | ||
| 10 | </Component> | ||
| 11 | </ComponentGroup> | ||
| 12 | </Fragment> | ||
| 13 | </Wix> | ||
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 @@ | |||
| 24 | <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\DialogsInInstallUISequence\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 25 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | 25 | <Content Include="TestData\DialogsInInstallUISequence\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 26 | <Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> | 26 | <Content Include="TestData\FeatureGroup\FeatureGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 27 | <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 27 | <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> | 28 | <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 28 | <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> | 29 | <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 29 | <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | 30 | <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> |
