diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-08-24 17:25:00 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-08-24 18:57:49 -0400 |
| commit | c237bb3bb00d36c50271a70baac68f49890e35e1 (patch) | |
| tree | 25f90ddb7b74180fc3ef299c899585f24e88809f /src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs | |
| parent | 2c040e2d5b401af3607cf6e482cffeaa511d167a (diff) | |
| download | wix-c237bb3bb00d36c50271a70baac68f49890e35e1.tar.gz wix-c237bb3bb00d36c50271a70baac68f49890e35e1.tar.bz2 wix-c237bb3bb00d36c50271a70baac68f49890e35e1.zip | |
Update decompiler to use XDocument rather than generated classes.
- Use CompareXml for diffing.
- Change CustomAction/@ScriptFile to @ScriptSourceFile.
Diffstat (limited to 'src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs')
| -rw-r--r-- | src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs b/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs index 0a45c914..4a5cf544 100644 --- a/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/CustomTableFixture.cs | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | namespace WixToolsetTest.CoreIntegration | 3 | namespace WixToolsetTest.CoreIntegration |
| 4 | { | 4 | { |
| 5 | using System.IO; | 5 | using System.IO; |
| 6 | using System.Xml.Linq; | ||
| 6 | using WixBuildTools.TestSupport; | 7 | using WixBuildTools.TestSupport; |
| 7 | using WixToolset.Core.TestPackage; | 8 | using WixToolset.Core.TestPackage; |
| 8 | using Xunit; | 9 | using Xunit; |
| @@ -224,20 +225,8 @@ namespace WixToolsetTest.CoreIntegration | |||
| 224 | 225 | ||
| 225 | result.AssertSuccess(); | 226 | result.AssertSuccess(); |
| 226 | 227 | ||
| 227 | CompareLineByLine(expectedFile, decompiledWxsPath); | 228 | WixAssert.CompareXml(expectedFile, decompiledWxsPath); |
| 228 | } | 229 | } |
| 229 | } | 230 | } |
| 230 | |||
| 231 | private static void CompareLineByLine(string expectedFile, string actualFile) | ||
| 232 | { | ||
| 233 | var expectedLines = File.ReadAllLines(expectedFile); | ||
| 234 | var actualLines = File.ReadAllLines(actualFile); | ||
| 235 | for (var i = 0; i < expectedLines.Length; ++i) | ||
| 236 | { | ||
| 237 | Assert.True(actualLines.Length > i, $"{i}: Expected file longer than actual file"); | ||
| 238 | Assert.Equal($"{i}: {expectedLines[i]}", $"{i}: {actualLines[i]}"); | ||
| 239 | } | ||
| 240 | Assert.True(expectedLines.Length == actualLines.Length, "Actual file longer than expected file"); | ||
| 241 | } | ||
| 242 | } | 231 | } |
| 243 | } | 232 | } |
