The Free Software Media System - Server Backend & API
Add regression test
Bond_0090022508889ad
diff --git a/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs b/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.csindex 14a628e226..8cae6a238d 100644--- a/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs+++ b/MediaBrowser.MediaEncoding/Encoder/ApplePlatformHelper.cs@@ -18,7 +18,7 @@ public static partial class ApplePlatformHelper{private static readonly string[] _av1DecodeBlacklistedCpuClass = ["M1", "M2"];- private static string GetSysctlValue(string name)+ internal static string GetSysctlValue(string name){nuint length = 0;// Get length of the valuediff --git a/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs b/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.csnew file mode 100644index 0000000000..586a382485--- /dev/null+++ b/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs@@ -0,0 +1,18 @@+using System;+using System.Runtime.Versioning;+using MediaBrowser.MediaEncoding.Encoder;+using Xunit;++namespace Jellyfin.MediaEncoding.Tests;++[SupportedOSPlatform("macos")]+public class ApplePlatformHelperTests+{+ [Fact]+ public void GetSysctlValue_CpuBrand_NotEmpty()+ {+ Assert.SkipUnless(OperatingSystem.IsMacOS(), "macOS-only test");++ Assert.NotEmpty(ApplePlatformHelper.GetSysctlValue("machdep.cpu.brand_string"));+ }+}