diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-01-13 15:34:50 +0900 |
|---|---|---|
| committer | dkanada <dkanada@users.noreply.github.com> | 2020-01-13 15:34:50 +0900 |
| commit | 65e9a705d303ebfadbc58035f9763966141ee437 (patch) | |
| tree | fb89dd8615436ad2ee02953e682ba9f20036d1eb /tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs | |
| parent | a8cd963d468ba4fb4caa003d9eb927117a3afa77 (diff) | |
check operating system for absolute path test
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs b/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs index f2a8e447f..b2aa01e65 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs @@ -1,6 +1,8 @@ +using System; using AutoFixture; using AutoFixture.AutoMoq; using Emby.Server.Implementations.IO; +using MediaBrowser.Model.System; using Xunit; namespace Jellyfin.Server.Implementations.Tests.IO @@ -26,7 +28,16 @@ namespace Jellyfin.Server.Implementations.Tests.IO string expectedAbsolutePath) { var generatedPath = _sut.MakeAbsolutePath(folderPath, filePath); - Assert.Equal(expectedAbsolutePath, generatedPath); + + if (MediaBrowser.Common.System.OperatingSystem.Id == OperatingSystemId.Windows) + { + var windowsPath = "d:" + generatedPath.Replace('/', '\\'); + Assert.Equal(expectedAbsolutePath, windowsPath); + } + else + { + Assert.Equal(expectedAbsolutePath, generatedPath); + } } } } |
