diff options
| author | Bob Arnson <bob@firegiant.com> | 2026-08-01 22:55:27 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2026-08-09 22:55:24 -0400 |
| commit | 7db9a9436d8734d050582afdb3a2dfda21c606e1 (patch) | |
| tree | 651332dc9e84faee4c026883215f83d78dac63da /src/ext/Util/test | |
| parent | ccfda4f4a158b19f61b018b944eb86272f427f55 (diff) | |
| download | wix-bob/CancelWhenDeferred.tar.gz wix-bob/CancelWhenDeferred.tar.bz2 wix-bob/CancelWhenDeferred.zip | |
Add CancelWhenDeferred, like FailWhenDeferred.bob/CancelWhenDeferred
Useful for integration testing packages.
Diffstat (limited to 'src/ext/Util/test')
| -rw-r--r-- | src/ext/Util/test/WixToolsetTest.Util/TestData/Failures/Package.wxs | 9 | ||||
| -rw-r--r-- | src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/ext/Util/test/WixToolsetTest.Util/TestData/Failures/Package.wxs b/src/ext/Util/test/WixToolsetTest.Util/TestData/Failures/Package.wxs new file mode 100644 index 00000000..76975b69 --- /dev/null +++ b/src/ext/Util/test/WixToolsetTest.Util/TestData/Failures/Package.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
| 3 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 4 | |||
| 5 | <!-- Dead or alive, you're coming with me. --> | ||
| 6 | <util:FailWhenDeferred /> | ||
| 7 | <util:CancelWhenDeferred /> | ||
| 8 | </Package> | ||
| 9 | </Wix> | ||
diff --git a/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs index b29607c7..1f39601d 100644 --- a/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs | |||
| @@ -101,6 +101,21 @@ namespace WixToolsetTest.Util | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | [TestMethod] | 103 | [TestMethod] |
| 104 | public void CanBuildWithFailures() | ||
| 105 | { | ||
| 106 | var folder = TestData.Get(@"TestData\Failures"); | ||
| 107 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
| 108 | |||
| 109 | var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction"); | ||
| 110 | WixAssert.CompareLineByLine( | ||
| 111 | [ | ||
| 112 | "Binary:Wix4UtilCA_X64\t[Binary data]", | ||
| 113 | "CustomAction:Wix4FailWhenDeferred_X64\t1025\tWix4UtilCA_X64\tWixFailWhenDeferred\t", | ||
| 114 | "CustomAction:Wix8CancelWhenDeferred_X64\t1025\tWix4UtilCA_X64\tWixCancelWhenDeferred\t", | ||
| 115 | ], [.. results.OrderBy(s => s)]); | ||
| 116 | } | ||
| 117 | |||
| 118 | [TestMethod] | ||
| 104 | public void CanBuildInternetShortcutInProduct() | 119 | public void CanBuildInternetShortcutInProduct() |
| 105 | { | 120 | { |
| 106 | var folder = TestData.Get(@"TestData\InternetShortcut"); | 121 | var folder = TestData.Get(@"TestData\InternetShortcut"); |
