@joebigelow / wix-1 / commits / 92bd26da

Fix parsing Shortcut/@Name and detect duplicate in GetMsiFilenameValue.

Sean Hall committed Nov 13, 2019 at 11:04 UTC 92bd26dab11023a0c4c787945fd87b23aa0a78c8
4 files changed +3 -34
src/WixToolset.Core.WindowsInstaller/Bind/CreateOutputFromIRCommand.cs
+1 -1
@@ -1146,7 +1146,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1146
1147 private static string GetMsiFilenameValue(string shortName, string longName)
1148 {
1149 - if (String.IsNullOrEmpty(shortName))
1149 + if (String.IsNullOrEmpty(shortName) || String.Equals(shortName, longName, StringComparison.OrdinalIgnoreCase))
1150 {
1151 return longName;
1152 }
src/WixToolset.Core/Compiler_2.cs
-1
@@ -4328,7 +4328,6 @@ namespace WixToolset.Core
4328 if (null == shortName)
4329 {
4330 shortName = name;
4331 - name = null;
4331 }
4332 else
4333 {
src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+2 -2
@@ -384,7 +384,7 @@ namespace WixToolsetTest.CoreIntegration
384 }
385 }
386
387 - [Fact(Skip = "Test demonstrates failure")]
387 + [Fact]
388 public void PopulatesDirectoryTableWithValidDefaultDir()
389 {
390 var folder = TestData.Get(@"TestData");
@@ -648,7 +648,7 @@ namespace WixToolsetTest.CoreIntegration
648 }
649 }
650
651 - [Fact(Skip = "Test demonstrates failure")]
651 + [Fact]
652 public void PopulatesMsiShortcutPropertyTable()
653 {
654 var folder = TestData.Get(@"TestData");
src/test/WixToolsetTest.CoreIntegration/WixlibQueryFixture.cs
-30
@@ -12,36 +12,6 @@ namespace WixToolsetTest.CoreIntegration
12
13 public class WixlibQueryFixture
14 {
15 - [Fact(Skip = "Test demonstrates failure")]
16 - public void ShortcutNameWithPreprocessorVariableIsResolved()
17 - {
18 - var folder = TestData.Get(@"TestData\Shortcut");
19 -
20 - using (var fs = new DisposableFileSystem())
21 - {
22 - var baseFolder = fs.GetFolder();
23 - var intermediateFolder = Path.Combine(baseFolder, "obj");
24 - var wixlibPath = Path.Combine(intermediateFolder, @"test.wixlib");
25 -
26 - var result = WixRunner.Execute(new[]
27 - {
28 - "build",
29 - Path.Combine(folder, "ShortcutProperty.wxs"),
30 - "-intermediateFolder", intermediateFolder,
31 - "-o", wixlibPath
32 - });
33 -
34 - result.AssertSuccess();
35 -
36 - var intermediate = Intermediate.Load(wixlibPath);
37 - var allTuples = intermediate.Sections.SelectMany(s => s.Tuples);
38 - var shortcutTuple = allTuples.OfType<ShortcutTuple>()
39 - .SingleOrDefault();
40 - Assert.NotNull(shortcutTuple);
41 - Assert.Equal("d", shortcutTuple.Name);
42 - }
43 - }
44 -
15 [Fact]
16 public void UpgradeProducesReferenceToRemoveExistingProducts()
17 {