diff options
| author | Rob Mensching <rob@firegiant.com> | 2018-10-04 13:33:08 -0700 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2018-10-04 18:20:52 -0400 |
| commit | 240f3594db6f633ece6818afd28dde1e1ef6b36c (patch) | |
| tree | ab75f516217afa280944b2198a42c69b9a1b9cc0 /src/test/WixToolsetTest.WixCop/TestData | |
| parent | 917bfd43985af3afaac0b3a1d97a89a58bde1f2f (diff) | |
| download | wix-240f3594db6f633ece6818afd28dde1e1ef6b36c.tar.gz wix-240f3594db6f633ece6818afd28dde1e1ef6b36c.tar.bz2 wix-240f3594db6f633ece6818afd28dde1e1ef6b36c.zip | |
Fix WixCop namespaces and some C# modernization
Diffstat (limited to 'src/test/WixToolsetTest.WixCop/TestData')
5 files changed, 255 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/ConvertedPreprocessor.wxs b/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/ConvertedPreprocessor.wxs new file mode 100644 index 00000000..d6280185 --- /dev/null +++ b/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/ConvertedPreprocessor.wxs | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | <?include WixVer.wxi ?> | ||
| 7 | |||
| 8 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 9 | <Product Id="*" Name="!(loc.ShortProduct) v$(var.WixMajorMinor) Core" Language="1033" Manufacturer="!(loc.Company)" Version="$(var.WixMsiProductVersion)" UpgradeCode="3618724B-2523-44F9-A908-866AA619504D"> | ||
| 10 | <Package Compressed="yes" InstallerVersion="200" SummaryCodepage="1252" InstallScope="perMachine" /> | ||
| 11 | <swid:Tag Regid="!(loc.Regid)" InstallDirectory="INSTALLFOLDER" /> | ||
| 12 | |||
| 13 | <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." /> | ||
| 14 | |||
| 15 | <MediaTemplate CabinetTemplate="core{0}.cab" /> | ||
| 16 | |||
| 17 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> | ||
| 18 | <Component Id="Licensing" Directory="INSTALLFOLDER"> | ||
| 19 | <File Id="LICENSE.TXT" Source="LICENSE.TXT" /> | ||
| 20 | </Component> | ||
| 21 | |||
| 22 | <Component Id="ProductRegistration" Directory="INSTALLFOLDER"> | ||
| 23 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 24 | <RegistryValue Name="InstallFolder" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 25 | </RegistryKey> | ||
| 26 | </Component> | ||
| 27 | |||
| 28 | <Component Id="ProductFamilyRegistration" Directory="INSTALLFOLDER"> | ||
| 29 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajor).x"> | ||
| 30 | <RegistryValue Name="v$(var.WixMajorMinor)" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 31 | </RegistryKey> | ||
| 32 | </Component> | ||
| 33 | |||
| 34 | <Component Id="ProductInformation" Directory="BinFolder"> | ||
| 35 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 36 | <RegistryValue Name="InstallRoot" Value="[BinFolder]" Type="string" /> | ||
| 37 | <RegistryValue Name="ProductVersion" Value="[ProductVersion]" Type="string" /> | ||
| 38 | </RegistryKey> | ||
| 39 | |||
| 40 | <RemoveFolder Id="CleanupShortcutFolder" Directory="ShortcutFolder" On="uninstall" /> | ||
| 41 | </Component> | ||
| 42 | |||
| 43 | <Component Directory="BinFolder"> | ||
| 44 | <File Source="common\wixtoolset.org.ico"> | ||
| 45 | <?include ComRegistration.wxi ?> | ||
| 46 | </File> | ||
| 47 | <util:InternetShortcut Id="wixtoolset.org" Directory="ShortcutFolder" Name="WiX Home Page" Target="http://wixtoolset.org/" IconFile="file://[#wixtoolset.org.ico]" /> | ||
| 48 | </Component> | ||
| 49 | |||
| 50 | <ComponentGroupRef Id="ToolsetComponents" /> | ||
| 51 | <ComponentGroupRef Id="ExtensionComponents" /> | ||
| 52 | <ComponentGroupRef Id="LuxComponents" /> | ||
| 53 | <ComponentGroupRef Id="DocComponents" /> | ||
| 54 | </Feature> | ||
| 55 | |||
| 56 | <FeatureRef Id="Feature_MSBuild" /> | ||
| 57 | <FeatureRef Id="Feature_Intellisense2010" /> | ||
| 58 | <FeatureRef Id="Feature_Intellisense2012" /> | ||
| 59 | <FeatureRef Id="Feature_Intellisense2013" /> | ||
| 60 | <FeatureRef Id="Feature_Intellisense2015" /> | ||
| 61 | </Product> | ||
| 62 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/Preprocessor.wxs b/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/Preprocessor.wxs new file mode 100644 index 00000000..2eb908c2 --- /dev/null +++ b/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/Preprocessor.wxs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | <?include WixVer.wxi ?> | ||
| 7 | |||
| 8 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:swid="http://schemas.microsoft.com/wix/TagExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> | ||
| 9 | <Product Id="*" Name="!(loc.ShortProduct) v$(var.WixMajorMinor) Core" Language="1033" Manufacturer="!(loc.Company)" | ||
| 10 | Version="$(var.WixMsiProductVersion)" UpgradeCode="3618724B-2523-44F9-A908-866AA619504D"> | ||
| 11 | <Package Compressed="yes" InstallerVersion="200" SummaryCodepage="1252" InstallScope="perMachine" /> | ||
| 12 | <swid:Tag Regid="!(loc.Regid)" InstallDirectory="INSTALLFOLDER" /> | ||
| 13 | |||
| 14 | <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." /> | ||
| 15 | |||
| 16 | <MediaTemplate CabinetTemplate="core{0}.cab" /> | ||
| 17 | |||
| 18 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> | ||
| 19 | <Component Id="Licensing" Directory="INSTALLFOLDER"> | ||
| 20 | <File Source="LICENSE.TXT" /> | ||
| 21 | </Component> | ||
| 22 | |||
| 23 | <Component Id="ProductRegistration" Directory="INSTALLFOLDER"> | ||
| 24 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 25 | <RegistryValue Name="InstallFolder" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 26 | </RegistryKey> | ||
| 27 | </Component> | ||
| 28 | |||
| 29 | <Component Id="ProductFamilyRegistration" Directory="INSTALLFOLDER"> | ||
| 30 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajor).x"> | ||
| 31 | <RegistryValue Name="v$(var.WixMajorMinor)" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 32 | </RegistryKey> | ||
| 33 | </Component> | ||
| 34 | |||
| 35 | <Component Id="ProductInformation" Directory="BinFolder"> | ||
| 36 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 37 | <RegistryValue Name="InstallRoot" Value="[BinFolder]" Type="string"/> | ||
| 38 | <RegistryValue Name="ProductVersion" Value="[ProductVersion]" Type="string" /> | ||
| 39 | </RegistryKey> | ||
| 40 | |||
| 41 | <RemoveFolder Id="CleanupShortcutFolder" Directory="ShortcutFolder" On="uninstall" /> | ||
| 42 | </Component> | ||
| 43 | |||
| 44 | <Component Directory="BinFolder"> | ||
| 45 | <File Source="common\wixtoolset.org.ico"> | ||
| 46 | <?include ComRegistration.wxi ?> | ||
| 47 | </File> | ||
| 48 | <util:InternetShortcut Id="wixtoolset.org" Directory="ShortcutFolder" Name="WiX Home Page" Target="http://wixtoolset.org/" IconFile="file://[#wixtoolset.org.ico]" /> | ||
| 49 | </Component> | ||
| 50 | |||
| 51 | <ComponentGroupRef Id="ToolsetComponents" /> | ||
| 52 | <ComponentGroupRef Id="ExtensionComponents" /> | ||
| 53 | <ComponentGroupRef Id="LuxComponents" /> | ||
| 54 | <ComponentGroupRef Id="DocComponents" /> | ||
| 55 | </Feature> | ||
| 56 | |||
| 57 | <FeatureRef Id="Feature_MSBuild" /> | ||
| 58 | <FeatureRef Id="Feature_Intellisense2010" /> | ||
| 59 | <FeatureRef Id="Feature_Intellisense2012" /> | ||
| 60 | <FeatureRef Id="Feature_Intellisense2013" /> | ||
| 61 | <FeatureRef Id="Feature_Intellisense2015" /> | ||
| 62 | </Product> | ||
| 63 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/wixcop.settings.xml b/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/wixcop.settings.xml new file mode 100644 index 00000000..9d3ad496 --- /dev/null +++ b/src/test/WixToolsetTest.WixCop/TestData/Preprocessor/wixcop.settings.xml | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0"?> | ||
| 2 | <Settings> | ||
| 3 | <IgnoreErrors> | ||
| 4 | <Test Id="WhitespacePrecedingNodeWrong"/> | ||
| 5 | <Test Id="WhitespacePrecedingEndElementWrong"/> | ||
| 6 | </IgnoreErrors> | ||
| 7 | <ErrorsAsWarnings/> | ||
| 8 | <ExemptFiles/> | ||
| 9 | </Settings> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.WixCop/TestData/SingleFile/ConvertedSingleFile.wxs b/src/test/WixToolsetTest.WixCop/TestData/SingleFile/ConvertedSingleFile.wxs new file mode 100644 index 00000000..aacb68fa --- /dev/null +++ b/src/test/WixToolsetTest.WixCop/TestData/SingleFile/ConvertedSingleFile.wxs | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | <?include WixVer.wxi ?> | ||
| 7 | |||
| 8 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 9 | <Product Id="*" Name="!(loc.ShortProduct) v$(var.WixMajorMinor) Core" Language="1033" Manufacturer="!(loc.Company)" Version="$(var.WixMsiProductVersion)" UpgradeCode="3618724B-2523-44F9-A908-866AA619504D"> | ||
| 10 | <Package Compressed="yes" InstallerVersion="200" SummaryCodepage="1252" InstallScope="perMachine" /> | ||
| 11 | <swid:Tag Regid="!(loc.Regid)" InstallDirectory="INSTALLFOLDER" /> | ||
| 12 | |||
| 13 | <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." /> | ||
| 14 | |||
| 15 | <MediaTemplate CabinetTemplate="core{0}.cab" /> | ||
| 16 | |||
| 17 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> | ||
| 18 | <Component Id="Licensing" Directory="INSTALLFOLDER"> | ||
| 19 | <File Id="LICENSE.TXT" Source="LICENSE.TXT" /> | ||
| 20 | </Component> | ||
| 21 | |||
| 22 | <Component Id="ProductRegistration" Directory="INSTALLFOLDER"> | ||
| 23 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 24 | <RegistryValue Name="InstallFolder" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 25 | </RegistryKey> | ||
| 26 | </Component> | ||
| 27 | |||
| 28 | <Component Id="ProductFamilyRegistration" Directory="INSTALLFOLDER"> | ||
| 29 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajor).x"> | ||
| 30 | <RegistryValue Name="v$(var.WixMajorMinor)" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 31 | </RegistryKey> | ||
| 32 | </Component> | ||
| 33 | |||
| 34 | <Component Id="ProductInformation" Directory="BinFolder"> | ||
| 35 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 36 | <RegistryValue Name="InstallRoot" Value="[BinFolder]" Type="string" /> | ||
| 37 | <RegistryValue Name="ProductVersion" Value="[ProductVersion]" Type="string" /> | ||
| 38 | </RegistryKey> | ||
| 39 | |||
| 40 | <RemoveFolder Id="CleanupShortcutFolder" Directory="ShortcutFolder" On="uninstall" /> | ||
| 41 | </Component> | ||
| 42 | |||
| 43 | <Component Directory="BinFolder"> | ||
| 44 | <File Id="wixtoolset.org.ico" Source="common\wixtoolset.org.ico" /> | ||
| 45 | <util:InternetShortcut Id="wixtoolset.org" Directory="ShortcutFolder" Name="WiX Home Page" Target="http://wixtoolset.org/" IconFile="file://[#wixtoolset.org.ico]" /> | ||
| 46 | </Component> | ||
| 47 | |||
| 48 | <ComponentGroupRef Id="ToolsetComponents" /> | ||
| 49 | <ComponentGroupRef Id="ExtensionComponents" /> | ||
| 50 | <ComponentGroupRef Id="LuxComponents" /> | ||
| 51 | <ComponentGroupRef Id="DocComponents" /> | ||
| 52 | </Feature> | ||
| 53 | |||
| 54 | <FeatureRef Id="Feature_MSBuild" /> | ||
| 55 | <FeatureRef Id="Feature_Intellisense2010" /> | ||
| 56 | <FeatureRef Id="Feature_Intellisense2012" /> | ||
| 57 | <FeatureRef Id="Feature_Intellisense2013" /> | ||
| 58 | <FeatureRef Id="Feature_Intellisense2015" /> | ||
| 59 | </Product> | ||
| 60 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.WixCop/TestData/SingleFile/SingleFile.wxs b/src/test/WixToolsetTest.WixCop/TestData/SingleFile/SingleFile.wxs new file mode 100644 index 00000000..310ae811 --- /dev/null +++ b/src/test/WixToolsetTest.WixCop/TestData/SingleFile/SingleFile.wxs | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | <?include WixVer.wxi ?> | ||
| 7 | |||
| 8 | <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:swid="http://schemas.microsoft.com/wix/TagExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> | ||
| 9 | <Product Id="*" Name="!(loc.ShortProduct) v$(var.WixMajorMinor) Core" Language="1033" Manufacturer="!(loc.Company)" | ||
| 10 | Version="$(var.WixMsiProductVersion)" UpgradeCode="3618724B-2523-44F9-A908-866AA619504D"> | ||
| 11 | <Package Compressed="yes" InstallerVersion="200" SummaryCodepage="1252" InstallScope="perMachine" /> | ||
| 12 | <swid:Tag Regid="!(loc.Regid)" InstallDirectory="INSTALLFOLDER" /> | ||
| 13 | |||
| 14 | <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed." /> | ||
| 15 | |||
| 16 | <MediaTemplate CabinetTemplate="core{0}.cab" /> | ||
| 17 | |||
| 18 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> | ||
| 19 | <Component Id="Licensing" Directory="INSTALLFOLDER"> | ||
| 20 | <File Source="LICENSE.TXT" /> | ||
| 21 | </Component> | ||
| 22 | |||
| 23 | <Component Id="ProductRegistration" Directory="INSTALLFOLDER"> | ||
| 24 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 25 | <RegistryValue Name="InstallFolder" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 26 | </RegistryKey> | ||
| 27 | </Component> | ||
| 28 | |||
| 29 | <Component Id="ProductFamilyRegistration" Directory="INSTALLFOLDER"> | ||
| 30 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajor).x"> | ||
| 31 | <RegistryValue Name="v$(var.WixMajorMinor)" Value="[INSTALLFOLDER]" Type="string" /> | ||
| 32 | </RegistryKey> | ||
| 33 | </Component> | ||
| 34 | |||
| 35 | <Component Id="ProductInformation" Directory="BinFolder"> | ||
| 36 | <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows Installer XML\$(var.WixMajorMinor)"> | ||
| 37 | <RegistryValue Name="InstallRoot" Value="[BinFolder]" Type="string"/> | ||
| 38 | <RegistryValue Name="ProductVersion" Value="[ProductVersion]" Type="string" /> | ||
| 39 | </RegistryKey> | ||
| 40 | |||
| 41 | <RemoveFolder Id="CleanupShortcutFolder" Directory="ShortcutFolder" On="uninstall" /> | ||
| 42 | </Component> | ||
| 43 | |||
| 44 | <Component Directory="BinFolder"> | ||
| 45 | <File Source="common\wixtoolset.org.ico" /> | ||
| 46 | <util:InternetShortcut Id="wixtoolset.org" Directory="ShortcutFolder" Name="WiX Home Page" Target="http://wixtoolset.org/" IconFile="file://[#wixtoolset.org.ico]" /> | ||
| 47 | </Component> | ||
| 48 | |||
| 49 | <ComponentGroupRef Id="ToolsetComponents" /> | ||
| 50 | <ComponentGroupRef Id="ExtensionComponents" /> | ||
| 51 | <ComponentGroupRef Id="LuxComponents" /> | ||
| 52 | <ComponentGroupRef Id="DocComponents" /> | ||
| 53 | </Feature> | ||
| 54 | |||
| 55 | <FeatureRef Id="Feature_MSBuild" /> | ||
| 56 | <FeatureRef Id="Feature_Intellisense2010" /> | ||
| 57 | <FeatureRef Id="Feature_Intellisense2012" /> | ||
| 58 | <FeatureRef Id="Feature_Intellisense2013" /> | ||
| 59 | <FeatureRef Id="Feature_Intellisense2015" /> | ||
| 60 | </Product> | ||
| 61 | </Wix> | ||
