aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs')
-rw-r--r--src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
index 3a9781df..bace97b3 100644
--- a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
+++ b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs
@@ -65,5 +65,36 @@ namespace WixToolsetTest.CoreIntegration
65 Assert.Equal(expected, actualFormatted); 65 Assert.Equal(expected, actualFormatted);
66 } 66 }
67 } 67 }
68
69 [Fact(Skip = "Test demonstrates failure")]
70 public void CanDecompileOldClassTableDefinition()
71 {
72 // The input MSI was not created using standard methods, it is an example of a real world database that needs to be decompiled.
73 // The Class/@Feature_ column has length of 32, the File/@Attributes has length of 2,
74 // and numerous foreign key relationships are missing.
75 var folder = TestData.Get(@"TestData\Class");
76
77 using (var fs = new DisposableFileSystem())
78 {
79 var intermediateFolder = fs.GetFolder();
80 var outputPath = Path.Combine(intermediateFolder, @"Actual.wxs");
81
82 var result = WixRunner.Execute(new[]
83 {
84 "decompile",
85 Path.Combine(folder, "OldClassTableDef.msi"),
86 "-intermediateFolder", intermediateFolder,
87 "-o", outputPath
88 });
89
90 result.AssertSuccess();
91
92 var actual = File.ReadAllText(outputPath);
93 var actualFormatted = XDocument.Parse(actual, LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
94 var expected = XDocument.Load(Path.Combine(folder, "DecompiledOldClassTableDef.wxs"), LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString();
95
96 Assert.Equal(expected, actualFormatted);
97 }
98 }
68 } 99 }
69} 100}