diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-11-14 12:13:44 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-11-14 12:18:44 +1000 |
commit | e34ea332def4718110e9a7efcf9e12bf7456c753 (patch) | |
tree | c335ac029f5af9541fd61e30dba98005ed465ff4 /src | |
parent | a79a2bc97a428f635cccd58935c3bcd059743da4 (diff) | |
download | wix-e34ea332def4718110e9a7efcf9e12bf7456c753.tar.gz wix-e34ea332def4718110e9a7efcf9e12bf7456c753.tar.bz2 wix-e34ea332def4718110e9a7efcf9e12bf7456c753.zip |
Add failing test for decompiling a directory search under a registry search.
Diffstat (limited to 'src')
4 files changed, 58 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs index c2520896..c7c80f6e 100644 --- a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs | |||
@@ -67,6 +67,34 @@ namespace WixToolsetTest.CoreIntegration | |||
67 | } | 67 | } |
68 | 68 | ||
69 | [Fact(Skip = "Test demonstrates failure")] | 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")] | ||
70 | public void CanDecompileOldClassTableDefinition() | 98 | public void CanDecompileOldClassTableDefinition() |
71 | { | 99 | { |
72 | // The input MSI was not created using standard methods, it is an example of a real world database that needs to be decompiled. | 100 | // The input MSI was not created using standard methods, it is an example of a real world database that needs to be decompiled. |
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DecompiledNestedDirSearchUnderRegSearch.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DecompiledNestedDirSearchUnderRegSearch.wxs new file mode 100644 index 00000000..94ddfe19 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DecompiledNestedDirSearchUnderRegSearch.wxs | |||
@@ -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 | ||
diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/NestedDirSearchUnderRegSearch.msi b/src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/NestedDirSearchUnderRegSearch.msi new file mode 100644 index 00000000..7e0f8060 --- /dev/null +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/NestedDirSearchUnderRegSearch.msi | |||
Binary files differ | |||
diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 370f0ff5..75a55c31 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj | |||
@@ -16,8 +16,10 @@ | |||
16 | <Content Include="TestData\.Data\burn.exe" CopyToOutputDirectory="PreserveNewest" /> | 16 | <Content Include="TestData\.Data\burn.exe" CopyToOutputDirectory="PreserveNewest" /> |
17 | <Content Include="TestData\AppId\Advertised.wxs" CopyToOutputDirectory="PreserveNewest" /> | 17 | <Content Include="TestData\AppId\Advertised.wxs" CopyToOutputDirectory="PreserveNewest" /> |
18 | <Content Include="TestData\AppSearch\ComponentSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 18 | <Content Include="TestData\AppSearch\ComponentSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
19 | <Content Include="TestData\AppSearch\DecompiledNestedDirSearchUnderRegSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
19 | <Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 20 | <Content Include="TestData\AppSearch\DirectorySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
20 | <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 21 | <Content Include="TestData\AppSearch\FileSearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
22 | <Content Include="TestData\AppSearch\NestedDirSearchUnderRegSearch.msi" CopyToOutputDirectory="PreserveNewest" /> | ||
21 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> | 23 | <Content Include="TestData\AppSearch\RegistrySearch.wxs" CopyToOutputDirectory="PreserveNewest" /> |
22 | <Content Include="TestData\Class\DecompiledOldClassTableDef.wxs" CopyToOutputDirectory="PreserveNewest" /> | 24 | <Content Include="TestData\Class\DecompiledOldClassTableDef.wxs" CopyToOutputDirectory="PreserveNewest" /> |
23 | <Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" /> | 25 | <Content Include="TestData\Class\IconIndex0.wxs" CopyToOutputDirectory="PreserveNewest" /> |