diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-04-29 21:14:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-29 21:14:14 +0200 |
| commit | 78e66325fdc596ef434aba93a6a9f086225642ee (patch) | |
| tree | 0677a972ba769bf67f6f4d4a87d82388b9a95fd1 /tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs | |
| parent | 7195d3e42fe57c31171558e270f2ed09499f65f0 (diff) | |
| parent | 33327aa1a951a1d0717b39f8f71356f09eb7bd6e (diff) | |
Merge pull request #5891 from Bond-009/filesystem2
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs b/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs index 614a68975..30e6542f9 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/IO/ManagedFileSystemTests.cs @@ -42,6 +42,16 @@ namespace Jellyfin.Server.Implementations.Tests.IO } } + [Theory] + [InlineData("ValidFileName", "ValidFileName")] + [InlineData("AC/DC", "AC DC")] + [InlineData("Invalid\0", "Invalid ")] + [InlineData("AC/DC\0KD/A", "AC DC KD A")] + public void GetValidFilename_ReturnsValidFilename(string filename, string expectedFileName) + { + Assert.Equal(expectedFileName, _sut.GetValidFilename(filename)); + } + [SkippableFact] public void GetFileInfo_DanglingSymlink_ExistsFalse() { |
