mirror of
https://github.com/Jackett/Jackett.git
synced 2025-10-02 00:32:55 +02:00
core: Allow unit tests to run in non-Windows environments (#7022)
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
|
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
|
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
|
||||||
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -15,12 +15,7 @@ namespace Jackett.Test
|
|||||||
public WebUtilityHelpersTests()
|
public WebUtilityHelpersTests()
|
||||||
{
|
{
|
||||||
//https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider?view=netcore-2.0
|
//https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider?view=netcore-2.0
|
||||||
#if !NET461
|
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
|
||||||
{
|
|
||||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_codePagesToTest = new Encoding[]{
|
_codePagesToTest = new Encoding[]{
|
||||||
Encoding.UTF8,
|
Encoding.UTF8,
|
||||||
|
Reference in New Issue
Block a user