diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-07-12 22:40:30 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-07-12 22:44:02 -0400 |
| commit | a34b060e7b1375be7c8c557a985b484155ff2702 (patch) | |
| tree | 4fa2e115e49467c12b14ce9cdb49b103c3e4515f /src/test | |
| parent | 3bbca19f75e748242f0966dce7461c0508c208ba (diff) | |
| download | wix-a34b060e7b1375be7c8c557a985b484155ff2702.tar.gz wix-a34b060e7b1375be7c8c557a985b484155ff2702.tar.bz2 wix-a34b060e7b1375be7c8c557a985b484155ff2702.zip | |
Add elements to reference platform-specific extension custom actions.
Diffstat (limited to 'src/test')
6 files changed, 69 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/Package.en-us.wxl b/src/test/WixToolsetTest.Util/TestData/Queries/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/Queries/Package.en-us.wxl | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | |||
| 3 | <!-- | ||
| 4 | This file contains the declaration of all the localizable strings. | ||
| 5 | --> | ||
| 6 | <WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> | ||
| 7 | |||
| 8 | <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String> | ||
| 9 | <String Id="FeatureTitle">MsiPackage</String> | ||
| 10 | |||
| 11 | </WixLocalization> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/Package.wxs b/src/test/WixToolsetTest.Util/TestData/Queries/Package.wxs new file mode 100644 index 00000000..7f6cd7fa --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/Queries/Package.wxs | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 2 | <Product Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
| 3 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
| 4 | |||
| 5 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | ||
| 6 | |||
| 7 | <util:BroadcastEnvironmentChange /> | ||
| 8 | <util:CheckRebootRequired /> | ||
| 9 | <util:QueryWindowsDriverInfo /> | ||
| 10 | <util:QueryWindowsSuiteInfo /> | ||
| 11 | |||
| 12 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | ||
| 13 | <ComponentGroupRef Id="ProductComponents" /> | ||
| 14 | </Feature> | ||
| 15 | </Product> | ||
| 16 | |||
| 17 | <Fragment> | ||
| 18 | <util:BroadcastSettingChange /> | ||
| 19 | |||
| 20 | <Directory Id="TARGETDIR" Name="SourceDir"> | ||
| 21 | <Directory Id="ProgramFilesFolder"> | ||
| 22 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
| 23 | </Directory> | ||
| 24 | </Directory> | ||
| 25 | </Fragment> | ||
| 26 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/PackageComponents.wxs b/src/test/WixToolsetTest.Util/TestData/Queries/PackageComponents.wxs new file mode 100644 index 00000000..e2dce4ae --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/Queries/PackageComponents.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 2 | <Fragment> | ||
| 3 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | ||
| 4 | <Component> | ||
| 5 | <File Source="example.txt" /> | ||
| 6 | </Component> | ||
| 7 | </ComponentGroup> | ||
| 8 | </Fragment> | ||
| 9 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.Util/TestData/Queries/example.txt b/src/test/WixToolsetTest.Util/TestData/Queries/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Util/TestData/Queries/example.txt | |||
| @@ -0,0 +1 @@ | |||
| This is example.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs index 78a9f967..848e4aa2 100644 --- a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs | |||
| @@ -133,6 +133,24 @@ namespace WixToolsetTest.Util | |||
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | [Fact] | 135 | [Fact] |
| 136 | public void CanBuildWithQueries() | ||
| 137 | { | ||
| 138 | var folder = TestData.Get(@"TestData\Queries"); | ||
| 139 | var build = new Builder(folder, typeof(UtilExtensionFactory), new[] { folder }); | ||
| 140 | |||
| 141 | var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction"); | ||
| 142 | Assert.Equal(new[] | ||
| 143 | { | ||
| 144 | "Binary:Wix4UtilCA_A64\t[Binary data]", | ||
| 145 | "CustomAction:Wix4BroadcastEnvironmentChange_A64\t65\tWix4UtilCA_A64\tWixBroadcastEnvironmentChange\t", | ||
| 146 | "CustomAction:Wix4BroadcastSettingChange_A64\t65\tWix4UtilCA_A64\tWixBroadcastSettingChange\t", | ||
| 147 | "CustomAction:Wix4CheckRebootRequired_A64\t65\tWix4UtilCA_A64\tWixCheckRebootRequired\t", | ||
| 148 | "CustomAction:Wix4QueryOsDriverInfo_A64\t257\tWix4UtilCA_A64\tWixQueryOsDriverInfo\t", | ||
| 149 | "CustomAction:Wix4QueryOsInfo_A64\t257\tWix4UtilCA_A64\tWixQueryOsInfo\t", | ||
| 150 | }, results.OrderBy(s => s).ToArray()); | ||
| 151 | } | ||
| 152 | |||
| 153 | [Fact] | ||
| 136 | public void CanBuildBundleWithSearches() | 154 | public void CanBuildBundleWithSearches() |
| 137 | { | 155 | { |
| 138 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); | 156 | var burnStubPath = TestData.Get(@"TestData\.Data\burn.exe"); |
diff --git a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj index fcac4644..f2d5c486 100644 --- a/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj +++ b/src/test/WixToolsetTest.Util/WixToolsetTest.Util.csproj | |||
| @@ -39,6 +39,10 @@ | |||
| 39 | <Content Include="TestData\EventManifest\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | 39 | <Content Include="TestData\EventManifest\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> |
| 40 | <Content Include="TestData\EventManifest\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | 40 | <Content Include="TestData\EventManifest\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 41 | <Content Include="TestData\EventManifest\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | 41 | <Content Include="TestData\EventManifest\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> |
| 42 | <Content Include="TestData\Queries\example.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
| 43 | <Content Include="TestData\Queries\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
| 44 | <Content Include="TestData\Queries\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 45 | <Content Include="TestData\Queries\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 42 | </ItemGroup> | 46 | </ItemGroup> |
| 43 | 47 | ||
| 44 | <ItemGroup> | 48 | <ItemGroup> |
