diff options
Diffstat (limited to 'src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs')
-rw-r--r-- | src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs index 882a7861..a3ca2917 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs | |||
@@ -55,6 +55,60 @@ namespace WixToolsetTest.CoreIntegration | |||
55 | } | 55 | } |
56 | 56 | ||
57 | [Fact] | 57 | [Fact] |
58 | public void CanBuildWithCustomExitCodes() | ||
59 | { | ||
60 | var folder = TestData.Get(@"TestData"); | ||
61 | |||
62 | using (var fs = new DisposableFileSystem()) | ||
63 | { | ||
64 | var baseFolder = fs.GetFolder(); | ||
65 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
66 | var binFolder = Path.Combine(baseFolder, "bin"); | ||
67 | var bundlePath = Path.Combine(binFolder, "test.exe"); | ||
68 | var baFolderPath = Path.Combine(baseFolder, "ba"); | ||
69 | var extractFolderPath = Path.Combine(baseFolder, "extract"); | ||
70 | |||
71 | var result = WixRunner.Execute(new[] | ||
72 | { | ||
73 | "build", | ||
74 | Path.Combine(folder, "ExePackage", "CustomExitCodes.wxs"), | ||
75 | Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), | ||
76 | "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), | ||
77 | "-bindpath", Path.Combine(folder, ".Data"), | ||
78 | "-intermediateFolder", intermediateFolder, | ||
79 | "-o", bundlePath, | ||
80 | }); | ||
81 | |||
82 | result.AssertSuccess(); | ||
83 | |||
84 | Assert.True(File.Exists(bundlePath)); | ||
85 | |||
86 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); | ||
87 | extractResult.AssertSuccess(); | ||
88 | |||
89 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage"); | ||
90 | WixAssert.CompareLineByLine(new string[] | ||
91 | { | ||
92 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='F6E722518AC3AB7E31C70099368D5770788C179AA23226110DCF07319B1E1964' InstallSize='463360' Size='463360' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='-repair' Repairable='yes' DetectionType='condition' DetectCondition='detect' UninstallArguments='-uninstall' Uninstallable='yes'>" + | ||
93 | "<ExitCode Code='0' Type='2' />" + | ||
94 | "<ExitCode Code='3' Type='3' />" + | ||
95 | "<ExitCode Code='4' Type='4' />" + | ||
96 | "<ExitCode Code='3010' Type='2' />" + | ||
97 | "<ExitCode Code='-2147021886' Type='2' />" + | ||
98 | "<ExitCode Code='3011' Type='2' />" + | ||
99 | "<ExitCode Code='-2147021885' Type='2' />" + | ||
100 | "<ExitCode Code='1641' Type='2' />" + | ||
101 | "<ExitCode Code='-2147023255' Type='2' />" + | ||
102 | "<ExitCode Code='-2147483647' Type='2' />" + | ||
103 | "<ExitCode Code='-2147483648' Type='2' />" + | ||
104 | "<ExitCode Code='*' Type='1' />" + | ||
105 | "<PayloadRef Id='burn.exe' />" + | ||
106 | "</ExePackage>", | ||
107 | }, exePackages); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | [Fact] | ||
58 | public void WarningWhenInvalidArpEntryVersion() | 112 | public void WarningWhenInvalidArpEntryVersion() |
59 | { | 113 | { |
60 | var folder = TestData.Get(@"TestData"); | 114 | var folder = TestData.Get(@"TestData"); |