mirror of
https://github.com/Jackett/Jackett
synced 2025-01-01 04:38:20 +00:00
core: Allow unit tests to run in non-Windows environments (#7022)
This commit is contained in:
parent
163b162b2d
commit
67750982bc
2 changed files with 2 additions and 6 deletions
|
@ -28,6 +28,7 @@
|
|||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -15,12 +15,7 @@ namespace Jackett.Test
|
|||
public WebUtilityHelpersTests()
|
||||
{
|
||||
//https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider?view=netcore-2.0
|
||||
#if !NET461
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
{
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
}
|
||||
#endif
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
|
||||
_codePagesToTest = new Encoding[]{
|
||||
Encoding.UTF8,
|
||||
|
|
Loading…
Reference in a new issue