From 135dad52ea93d65e9cfe1490f34d12bec510c836 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 14 Nov 2018 20:23:35 -0500 Subject: Explicitly mark bitness of entities that support 64-bit attribute. This ensures that you can build a 64-bit package with 32-bit entities and not lose the "forced" 32-bit-ness in the decompiled output. --- .../DecompileFixture.cs | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs') diff --git a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs index 66ce98c0..3a9781df 100644 --- a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs @@ -37,5 +37,33 @@ namespace WixToolsetTest.CoreIntegration Assert.Equal(expected, actualFormatted); } } + + [Fact] + public void CanDecompile64BitSingleFileCompressed() + { + var folder = TestData.Get(@"TestData\DecompileSingleFileCompressed64"); + + using (var fs = new DisposableFileSystem()) + { + var intermediateFolder = fs.GetFolder(); + var outputPath = Path.Combine(intermediateFolder, @"Actual.wxs"); + + var result = WixRunner.Execute(new[] + { + "decompile", + Path.Combine(folder, "example.msi"), + "-intermediateFolder", intermediateFolder, + "-o", outputPath + }); + + result.AssertSuccess(); + + var actual = File.ReadAllText(outputPath); + var actualFormatted = XDocument.Parse(actual, LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString(); + var expected = XDocument.Load(Path.Combine(folder, "Expected.wxs"), LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString(); + + Assert.Equal(expected, actualFormatted); + } + } } } -- cgit v1.2.3-55-g6feb