Add failing test for decompiling the AdvtExecuteSequence table.
Sean Hall committed
Nov 14, 2019 at 09:23 UTC
a79a2bc97a428f635cccd58935c3bcd059743da4
4 files changed
+67
src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
+28
@@ -97,6 +97,34 @@ namespace WixToolsetTest.CoreIntegration
97
}
98
}
99
100
+ [Fact(Skip = "Test demonstrates failure")]
101
+ public void CanDecompileSequenceTables()
102
+ {
103
+ var folder = TestData.Get(@"TestData\SequenceTables");
104
+
105
+ using (var fs = new DisposableFileSystem())
106
+ {
107
+ var intermediateFolder = fs.GetFolder();
108
+ var outputPath = Path.Combine(intermediateFolder, @"Actual.wxs");
109
+
110
+ var result = WixRunner.Execute(new[]
111
+ {
112
+ "decompile",
113
+ Path.Combine(folder, "SequenceTables.msi"),
114
+ "-intermediateFolder", intermediateFolder,
115
+ "-o", outputPath
116
+ });
117
+
118
+ result.AssertSuccess();
119
+
120
+ var actual = File.ReadAllText(outputPath);
121
+ var actualFormatted = XDocument.Parse(actual, LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
122
+ var expected = XDocument.Load(Path.Combine(folder, "DecompiledSequenceTables.wxs"), LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
123
+
124
+ Assert.Equal(expected, actualFormatted);
125
+ }
126
+ }
127
+
128
[Fact(Skip = "Test demonstrates failure")]
129
public void CanDecompileShortcuts()
130
{
src/test/WixToolsetTest.CoreIntegration/TestData/SequenceTables/DecompiledSequenceTables.wxs
new
+37
@@ -0,0 +1,37 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Product Id="{74C29381-1915-4948-B8B4-5646806A0BD4}" 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
+ <CustomAction Id="CustomAction2" Property="TestAdvtExecuteSequenceProperty" Value="1" />
6
+ <Directory Id="TARGETDIR" Name="SourceDir">
7
+ <Directory Id="ProgramFilesFolder">
8
+ <Directory Id="INSTALLFOLDER" Name="MsiPackage" ShortName="ykd0udtb">
9
+ <Component Id="test.txt" Guid="{E597A58A-03CB-50D8-93E3-DABA263F233A}" Win64="no">
10
+ <File Id="test.txt" Name="test.txt" KeyPath="yes" Source="SourceDir\\MsiPackage\test.txt" />
11
+ </Component>
12
+ </Directory>
13
+ </Directory>
14
+ </Directory>
15
+ <Feature Id="ProductFeature" Level="1" Title="MsiPackageTitle">
16
+ <ComponentRef Id="test.txt" />
17
+ </Feature>
18
+ <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
19
+ <Media Id="1" />
20
+ <Property Id="ALLUSERS" Value="1" />
21
+ <InstallExecuteSequence>
22
+ <Custom Action="CustomAction2" After="CostInitialize" />
23
+ </InstallExecuteSequence>
24
+ <InstallUISequence>
25
+ <Custom Action="CustomAction2" After="CostInitialize" />
26
+ </InstallUISequence>
27
+ <AdminExecuteSequence>
28
+ <Custom Action="CustomAction2" After="CostInitialize" />
29
+ </AdminExecuteSequence>
30
+ <AdminUISequence>
31
+ <Custom Action="CustomAction2" After="CostInitialize" />
32
+ </AdminUISequence>
33
+ <AdvertiseExecuteSequence>
34
+ <Custom Action="CustomAction2" After="CostInitialize" />
35
+ </AdvertiseExecuteSequence>
36
+ </Product>
37
+</Wix>
\ No newline at end of file
src/test/WixToolsetTest.CoreIntegration/TestData/SequenceTables/SequenceTables.msi
Binary files /dev/null and b/src/test/WixToolsetTest.CoreIntegration/TestData/SequenceTables/SequenceTables.msi differ
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
+2
@@ -47,6 +47,8 @@
47
<Content Include="TestData\Registry\RegistryValue.wxs" CopyToOutputDirectory="PreserveNewest" />
48
<Content Include="TestData\Registry\RemoveRegistryKey.wxs" CopyToOutputDirectory="PreserveNewest" />
49
<Content Include="TestData\ReserveCost\ReserveCost.wxs" CopyToOutputDirectory="PreserveNewest" />
50
+ <Content Include="TestData\SequenceTables\DecompiledSequenceTables.wxs" CopyToOutputDirectory="PreserveNewest" />
51
+ <Content Include="TestData\SequenceTables\SequenceTables.msi" CopyToOutputDirectory="PreserveNewest" />
52
<Content Include="TestData\ServiceInstall\OwnProcess.wxs" CopyToOutputDirectory="PreserveNewest" />
53
<Content Include="TestData\Shortcut\DecompiledShortcuts.wxs" CopyToOutputDirectory="PreserveNewest" />
54
<Content Include="TestData\Shortcut\ShortcutProperty.wxs" CopyToOutputDirectory="PreserveNewest" />