aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2026-06-18 17:45:55 +0200
committerGitHub <noreply@github.com>2026-06-18 17:45:55 +0200
commit751b763838d8744f7a52682d3c87e62af1a12bd3 (patch)
tree112aaaa3889c70f2282c5615192af2c352d6fc9a /tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs
parent49f8a96360058419acb14217699f71a2c970e055 (diff)
parente86b502cbc9d48c876cc125f3c316171c1113926 (diff)
Merge pull request #17099 from Bond-009/libraryimport
Follow native interoperability best practices
Diffstat (limited to 'tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs')
-rw-r--r--tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs b/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs
new file mode 100644
index 0000000000..9847acbb0a
--- /dev/null
+++ b/tests/Jellyfin.MediaEncoding.Tests/Encoder/ApplePlatformHelperTests.cs
@@ -0,0 +1,22 @@
+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");
+
+ var value = ApplePlatformHelper.GetSysctlValue("machdep.cpu.brand_string");
+ Assert.NotEmpty(value);
+
+ // Make sure we don't include the null terminator
+ Assert.DoesNotContain("\0", value, StringComparison.Ordinal);
+ }
+}