@joebigelow / wix / commits / cef530d2

Add failing test for RegistryValue.

Sean Hall committed Oct 11, 2019 at 15:17 UTC cef530d2414767fa8523dae4beb5de4db5edd6f5
3 files changed +43
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+32
@@ -514,6 +514,38 @@ namespace WixToolsetTest.CoreIntegration
514 }
515 }
516
517 + [Fact(Skip = "Test demonstrates failure")]
518 + public void PopulatesRegistryTableFromRegistryValue()
519 + {
520 + var folder = TestData.Get(@"TestData");
521 +
522 + using (var fs = new DisposableFileSystem())
523 + {
524 + var baseFolder = fs.GetFolder();
525 + var intermediateFolder = Path.Combine(baseFolder, "obj");
526 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
527 +
528 + var result = WixRunner.Execute(new[]
529 + {
530 + "build",
531 + Path.Combine(folder, "Registry", "RegistryValue.wxs"),
532 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
533 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
534 + "-intermediateFolder", intermediateFolder,
535 + "-o", msiPath
536 + });
537 +
538 + result.AssertSuccess();
539 +
540 + Assert.True(File.Exists(msiPath));
541 + var results = Query.QueryDatabase(msiPath, new[] { "Registry" });
542 + Assert.Equal(new[]
543 + {
544 + "Registry:regEblTuusqFNSUQNy88zaP_UA5kIY\t2\tPath\\To\\Key\t\t1.0.1234.123\tMiscComponent",
545 + }, results);
546 + }
547 + }
548 +
549 [Fact]
550 public void PopulatesReserveCostTable()
551 {
src/test/WixToolsetTest.CoreIntegration/TestData/Registry/RegistryValue.wxs new
+10
@@ -0,0 +1,10 @@
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 + <RegistryValue Root="HKLM" Key="Path\To\Key" Value="1.0.1234.123" Type="string" KeyPath="yes" />
7 + </Component>
8 + </ComponentGroup>
9 + </Fragment>
10 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -30,6 +30,7 @@
30 <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" />
31 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
33 + <Content Include="TestData\Registry\RegistryValue.wxs" CopyToOutputDirectory="PreserveNewest" />
34 <Content Include="TestData\ReserveCost\ReserveCost.wxs" CopyToOutputDirectory="PreserveNewest" />
35 <Content Include="TestData\ServiceInstall\OwnProcess.wxs" CopyToOutputDirectory="PreserveNewest" />
36 <Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" />