diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-11-08 13:37:15 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-11-08 14:53:03 +1000 |
| commit | e03595bdca426a03ad740e4c312f028f97f465ec (patch) | |
| tree | 2a433cc6defe72a2af8d33dc9596a986147d7174 /src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs | |
| parent | 62c2eaf958c0b1a410fdf91dd0edcb542c60ef07 (diff) | |
| download | wix-e03595bdca426a03ad740e4c312f028f97f465ec.tar.gz wix-e03595bdca426a03ad740e4c312f028f97f465ec.tar.bz2 wix-e03595bdca426a03ad740e4c312f028f97f465ec.zip | |
Add failing test for decompiling a non-advertised shortcut with complex Target.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs index bace97b3..d6cf4742 100644 --- a/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/DecompileFixture.cs | |||
| @@ -96,5 +96,33 @@ namespace WixToolsetTest.CoreIntegration | |||
| 96 | Assert.Equal(expected, actualFormatted); | 96 | Assert.Equal(expected, actualFormatted); |
| 97 | } | 97 | } |
| 98 | } | 98 | } |
| 99 | |||
| 100 | [Fact(Skip = "Test demonstrates failure")] | ||
| 101 | public void CanDecompileShortcuts() | ||
| 102 | { | ||
| 103 | var folder = TestData.Get(@"TestData\Shortcut"); | ||
| 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, "shortcuts.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, "DecompiledShortcuts.wxs"), LoadOptions.PreserveWhitespace | LoadOptions.SetBaseUri | LoadOptions.SetLineInfo).ToString(); | ||
| 123 | |||
| 124 | Assert.Equal(expected, actualFormatted); | ||
| 125 | } | ||
| 126 | } | ||
| 99 | } | 127 | } |
| 100 | } | 128 | } |
