From e98ff251390fe60946576b4dced9565ae3a43e43 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Fri, 16 Feb 2024 19:53:19 -0500 Subject: [PATCH] Test/sample for default major upgrade message. --- .../DefaultMajorUpgrade.wxs | 12 ++++++++++++ .../DefaultMajorUpgradeOverride/Package.en-us.wxl | 4 ++++ .../UpgradeFixture.cs | 13 +++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/DefaultMajorUpgrade.wxs create mode 100644 src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/Package.en-us.wxl diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/DefaultMajorUpgrade.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/DefaultMajorUpgrade.wxs new file mode 100644 index 000000000..ce9fd96fb --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/DefaultMajorUpgrade.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/Package.en-us.wxl b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/Package.en-us.wxl new file mode 100644 index 000000000..515a7e8ed --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/Package.en-us.wxl @@ -0,0 +1,4 @@ + + + + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs index 1ae742107..72d09b637 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs @@ -73,6 +73,19 @@ public void DefaultMajorUpgradePopulatesUpgradeRowsAsExpected() }, results); } + [Fact] + public void CanOverrideDefaultMajorUpgradeLaunchConditionMessage() + { + var folder = TestData.Get("TestData", "DefaultMajorUpgradeOverride"); + var build = new Builder(folder, new Type[] { }, new[] { folder }); + + var results = build.BuildAndQuery(Build, "LaunchCondition"); + WixAssert.CompareLineByLine(new[] + { + "LaunchCondition:NOT WIX_DOWNGRADE_DETECTED\t[ProductName] does not support downgrading.", + }, results); + } + [Fact] public void UpgradeStrategyNoneDoesNotCreateDefaultMajorUpgrade() {