@joebigelow / wix / commits / 5baccaff

Add failing test for MsiShortcutProperty.

Sean Hall committed Sep 30, 2019 at 11:23 UTC 5baccaff10f10ae135a1de20ce22608c7dafbb11
3 files changed +48
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+33
@@ -378,6 +378,39 @@ namespace WixToolsetTest.CoreIntegration
378 }
379 }
380
381 + [Fact(Skip = "Test demonstrates failure")]
382 + public void PopulatesMsiShortcutPropertyTable()
383 + {
384 + var folder = TestData.Get(@"TestData");
385 +
386 + using (var fs = new DisposableFileSystem())
387 + {
388 + var baseFolder = fs.GetFolder();
389 + var intermediateFolder = Path.Combine(baseFolder, "obj");
390 + var msiPath = Path.Combine(baseFolder, @"bin\test.msi");
391 +
392 + var result = WixRunner.Execute(new[]
393 + {
394 + "build",
395 + Path.Combine(folder, "Shortcut", "ShortcutProperty.wxs"),
396 + Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
397 + Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
398 + "-bindpath", Path.Combine(folder, "SingleFile", "data"),
399 + "-intermediateFolder", intermediateFolder,
400 + "-o", msiPath
401 + });
402 +
403 + result.AssertSuccess();
404 +
405 + Assert.True(File.Exists(msiPath));
406 + var results = Query.QueryDatabase(msiPath, new[] { "MsiShortcutProperty" });
407 + Assert.Equal(new[]
408 + {
409 + "MsiShortcutProperty:scp4GOCIx4Eskci4nBG1MV_vSUOZt4\tTheShortcut\tCustomShortcutKey\tCustomShortcutValue",
410 + }, results);
411 + }
412 + }
413 +
414 [Fact(Skip = "Test demonstrates failure")]
415 public void PopulatesUpgradeTableFromManualUpgrade()
416 {
src/test/WixToolsetTest.CoreIntegration/TestData/Shortcut/ShortcutProperty.wxs new
+14
@@ -0,0 +1,14 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Fragment>
4 + <ComponentGroup Id="ProductComponents">
5 + <Component Id="ShortcutComp" Directory="INSTALLFOLDER" Guid="5B3B3FC1-533D-4C29-BFB3-0E88B51E59D8">
6 + <File Source="test.txt">
7 + <Shortcut Id="TheShortcut" Name="TestShortcut" Directory="INSTALLFOLDER">
8 + <ShortcutProperty Key="CustomShortcutKey" Value="CustomShortcutValue"></ShortcutProperty>
9 + </Shortcut>
10 + </File>
11 + </Component>
12 + </ComponentGroup>
13 + </Fragment>
14 +</Wix>
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+1
@@ -27,6 +27,7 @@
27 <Content Include="TestData\LockPermissions\EmptyPermissions.wxs" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\ProductWithComponentGroupRef\MinimalComponentGroup.wxs" CopyToOutputDirectory="PreserveNewest" />
29 <Content Include="TestData\ProductWithComponentGroupRef\Product.wxs" CopyToOutputDirectory="PreserveNewest" />
30 + <Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" />
31 <Content Include="TestData\SimpleModule\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\SimpleModule\Module.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
33 <Content Include="TestData\SimpleModule\Module.wxs" CopyToOutputDirectory="PreserveNewest" />