diff options
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs deleted file mode 100644 index ab04da15..00000000 --- a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs +++ /dev/null | |||
| @@ -1,86 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.CoreIntegration | ||
| 4 | { | ||
| 5 | using System.IO; | ||
| 6 | using WixBuildTools.TestSupport; | ||
| 7 | using WixToolset.Core.TestPackage; | ||
| 8 | using Xunit; | ||
| 9 | |||
| 10 | public class DecompileFixture | ||
| 11 | { | ||
| 12 | private static void DecompileAndCompare(string sourceFolder, string msiName, string expectedWxsName) | ||
| 13 | { | ||
| 14 | var folder = TestData.Get(sourceFolder); | ||
| 15 | |||
| 16 | using (var fs = new DisposableFileSystem()) | ||
| 17 | { | ||
| 18 | var intermediateFolder = fs.GetFolder(); | ||
| 19 | var outputPath = Path.Combine(intermediateFolder, @"Actual.wxs"); | ||
| 20 | |||
| 21 | var result = WixRunner.Execute(new[] | ||
| 22 | { | ||
| 23 | "decompile", | ||
| 24 | Path.Combine(folder, msiName), | ||
| 25 | "-intermediateFolder", intermediateFolder, | ||
| 26 | "-o", outputPath | ||
| 27 | }); | ||
| 28 | |||
| 29 | result.AssertSuccess(); | ||
| 30 | |||
| 31 | WixAssert.CompareXml(Path.Combine(folder, expectedWxsName), outputPath); | ||
| 32 | } | ||
| 33 | } | ||
| 34 | |||
| 35 | [Fact] | ||
| 36 | public void CanDecompileSingleFileCompressed() | ||
| 37 | { | ||
| 38 | DecompileAndCompare(@"TestData\DecompileSingleFileCompressed", "example.msi", "Expected.wxs"); | ||
| 39 | } | ||
| 40 | |||
| 41 | [Fact] | ||
| 42 | public void CanDecompile64BitSingleFileCompressed() | ||
| 43 | { | ||
| 44 | DecompileAndCompare(@"TestData\DecompileSingleFileCompressed64", "example.msi", "Expected.wxs"); | ||
| 45 | } | ||
| 46 | |||
| 47 | [Fact] | ||
| 48 | public void CanDecompileNestedDirSearchUnderRegSearch() | ||
| 49 | { | ||
| 50 | DecompileAndCompare(@"TestData\AppSearch", "NestedDirSearchUnderRegSearch.msi", "DecompiledNestedDirSearchUnderRegSearch.wxs"); | ||
| 51 | } | ||
| 52 | |||
| 53 | [Fact] | ||
| 54 | public void CanDecompileOldClassTableDefinition() | ||
| 55 | { | ||
| 56 | // The input MSI was not created using standard methods, it is an example of a real world database that needs to be decompiled. | ||
| 57 | // The Class/@Feature_ column has length of 32, the File/@Attributes has length of 2, | ||
| 58 | // and numerous foreign key relationships are missing. | ||
| 59 | DecompileAndCompare(@"TestData\Class", "OldClassTableDef.msi", "DecompiledOldClassTableDef.wxs"); | ||
| 60 | } | ||
| 61 | |||
| 62 | [Fact] | ||
| 63 | public void CanDecompileSequenceTables() | ||
| 64 | { | ||
| 65 | DecompileAndCompare(@"TestData\SequenceTables", "SequenceTables.msi", "DecompiledSequenceTables.wxs"); | ||
| 66 | } | ||
| 67 | |||
| 68 | [Fact] | ||
| 69 | public void CanDecompileShortcuts() | ||
| 70 | { | ||
| 71 | DecompileAndCompare(@"TestData\Shortcut", "shortcuts.msi", "DecompiledShortcuts.wxs"); | ||
| 72 | } | ||
| 73 | |||
| 74 | [Fact] | ||
| 75 | public void CanDecompileNullComponent() | ||
| 76 | { | ||
| 77 | DecompileAndCompare(@"TestData\DecompileNullComponent", "example.msi", "Expected.wxs"); | ||
| 78 | } | ||
| 79 | |||
| 80 | [Fact] | ||
| 81 | public void CanDecompileMergeModuleWithTargetDirComponent() | ||
| 82 | { | ||
| 83 | DecompileAndCompare(@"TestData\DecompileTargetDirMergeModule", "MergeModule1.msm", "Expected.wxs"); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | } | ||
