diff options
author | Bob Arnson <bob@firegiant.com> | 2024-02-16 19:53:19 -0500 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2024-02-16 20:43:11 -0500 |
commit | e98ff251390fe60946576b4dced9565ae3a43e43 (patch) | |
tree | f08f9c4fa29e6870c0cd40eb21c89099e98b2290 | |
parent | 3fa17617b89d62103cc35b37424ab6fa5b9f08be (diff) | |
download | wix-e98ff251390fe60946576b4dced9565ae3a43e43.tar.gz wix-e98ff251390fe60946576b4dced9565ae3a43e43.tar.bz2 wix-e98ff251390fe60946576b4dced9565ae3a43e43.zip |
Test/sample for default major upgrade message.
3 files changed, 29 insertions, 0 deletions
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 00000000..ce9fd96f --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/DefaultMajorUpgrade.wxs | |||
@@ -0,0 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <Package Name="MajorUpgradeDowngradeMessage" Language="1033" Version="2.0.0" Manufacturer="Example Corporation" UpgradeCode="7ab24276-c628-43db-9e65-a184d052909b" Scope="perMachine"> | ||
3 | <Feature Id="ProductFeature" Title="MsiPackageTitle"> | ||
4 | </Feature> | ||
5 | </Package> | ||
6 | |||
7 | <Fragment> | ||
8 | <StandardDirectory Id="ProgramFiles6432Folder"> | ||
9 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
10 | </StandardDirectory> | ||
11 | </Fragment> | ||
12 | </Wix> | ||
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 00000000..515a7e8e --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgradeOverride/Package.en-us.wxl | |||
@@ -0,0 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
3 | <String Id="WixDowngradePreventedMessage" Value="[ProductName] does not support downgrading." /> | ||
4 | </WixLocalization> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs index 1ae74210..72d09b63 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs | |||
@@ -74,6 +74,19 @@ namespace WixToolsetTest.CoreIntegration | |||
74 | } | 74 | } |
75 | 75 | ||
76 | [Fact] | 76 | [Fact] |
77 | public void CanOverrideDefaultMajorUpgradeLaunchConditionMessage() | ||
78 | { | ||
79 | var folder = TestData.Get("TestData", "DefaultMajorUpgradeOverride"); | ||
80 | var build = new Builder(folder, new Type[] { }, new[] { folder }); | ||
81 | |||
82 | var results = build.BuildAndQuery(Build, "LaunchCondition"); | ||
83 | WixAssert.CompareLineByLine(new[] | ||
84 | { | ||
85 | "LaunchCondition:NOT WIX_DOWNGRADE_DETECTED\t[ProductName] does not support downgrading.", | ||
86 | }, results); | ||
87 | } | ||
88 | |||
89 | [Fact] | ||
77 | public void UpgradeStrategyNoneDoesNotCreateDefaultMajorUpgrade() | 90 | public void UpgradeStrategyNoneDoesNotCreateDefaultMajorUpgrade() |
78 | { | 91 | { |
79 | var folder = TestData.Get("TestData", "DefaultMajorUpgradeNone"); | 92 | var folder = TestData.Get("TestData", "DefaultMajorUpgradeNone"); |