Add failing test for decompiling a directory search under a registry search.
Sean Hall committed
Nov 14, 2019 at 12:13 UTC
e34ea332def4718110e9a7efcf9e12bf7456c753
4 files changed
+58
src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
+28
@@ -66,6 +66,34 @@ namespace WixToolsetTest.CoreIntegration
66
}
67
}
68
69
+ [Fact(Skip = "Test demonstrates failure")]
70
+ public void CanDecompileNestedDirSearchUnderRegSearch()
71
+ {
72
+ var folder = TestData.Get(@"TestData\AppSearch");
73
+
74
+ using (var fs = new DisposableFileSystem())
75
+ {
76
+ var intermediateFolder = fs.GetFolder();
77
+ var outputPath = Path.Combine(intermediateFolder, @"Actual.wxs");
78
+
79
+ var result = WixRunner.Execute(new[]
80
+ {
81
+ "decompile",
82
+ Path.Combine(folder, "NestedDirSearchUnderRegSearch.msi"),
83
+ "-intermediateFolder", intermediateFolder,
84
+ "-o", outputPath
85
+ });
86
+
87
+ result.AssertSuccess();
88
+
89
+ var actual = File.ReadAllText(outputPath);
90
+ var actualFormatted = XDocument.Parse(actual, LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
91
+ var expected = XDocument.Load(Path.Combine(folder, "DecompiledNestedDirSearchUnderRegSearch.wxs"), LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
92
+
93
+ Assert.Equal(expected, actualFormatted);
94
+ }
95
+ }
96
+
97
[Fact(Skip = "Test demonstrates failure")]
98
public void CanDecompileOldClassTableDefinition()
99
{
src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DecompiledNestedDirSearchUnderRegSearch.wxs
new
+28
@@ -0,0 +1,28 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Product Id="{F71CC1C8-8EDC-4FCD-8946-D92AE30B3ABE}" Codepage="1252" Language="1033" Manufacturer="Example Corporation" Name="MsiPackage" UpgradeCode="{12E4699F-E774-4D05-8A01-5BDD41BBA127}" Version="1.0.0.0">
4
+ <Package Description="MsiPackage" InstallerVersion="500" Languages="1033" Manufacturer="Example Corporation" Platform="x86" />
5
+ <Directory Id="TARGETDIR" Name="SourceDir">
6
+ <Directory Id="ProgramFilesFolder">
7
+ <Directory Id="INSTALLFOLDER" Name="MsiPackage" ShortName="ykd0udtb">
8
+ <Component Id="test.txt" Guid="{E597A58A-03CB-50D8-93E3-DABA263F233A}" Win64="no">
9
+ <File Id="test.txt" Name="test.txt" KeyPath="yes" Source="SourceDir\\MsiPackage\test.txt" />
10
+ </Component>
11
+ </Directory>
12
+ </Directory>
13
+ </Directory>
14
+ <Feature Id="ProductFeature" Level="1" Title="MsiPackageTitle">
15
+ <ComponentRef Id="test.txt" />
16
+ </Feature>
17
+ <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
18
+ <Media Id="1" />
19
+ <Property Id="ALLUSERS" Value="1" />
20
+ <Property Id="SAMPLEDIRFOUND">
21
+ <RegistrySearch Id="SubRegSearch" Root="HKLM" Key="SampleReg" Type="raw">
22
+ <DirectorySearch Id="SampleDirSearch" Path="SampleDir">
23
+ <DirectorySearch Id="SubDirSearch" Path="Subdir" />
24
+ </DirectorySearch>
25
+ </RegistrySearch>
26
+ </Property>
27
+ </Product>
28
+</Wix>
\ No newline at end of file
src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/NestedDirSearchUnderRegSearch.msi
Binary files /dev/null and b/src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/NestedDirSearchUnderRegSearch.msi differ
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+2
@@ -16,8 +16,10 @@
16
<Content Include="TestData\.Data\burn.exe" CopyToOutputDirectory="PreserveNewest" />
17
<Content Include="TestData\AppId\Advertised.wxs" CopyToOutputDirectory="PreserveNewest" />
18
<Content Include="TestData\AppSearch\ComponentSearch.wxs" CopyToOutputDirectory="PreserveNewest" />
19
+ <Content Include="TestData\AppSearch\DecompiledNestedDirSearchUnderRegSearch.wxs" CopyToOutputDirectory="PreserveNewest" />
20
<Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
21
<Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" />
22
+ <Content Include="TestData\AppSearch\NestedDirSearchUnderRegSearch.msi" CopyToOutputDirectory="PreserveNewest" />
23
<Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" />
24
<Content Include="TestData\Class\DecompiledOldClassTableDef.wxs" CopyToOutputDirectory="PreserveNewest" />
25
<Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" />