diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-05-05 17:20:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-05 17:20:14 +0200 |
| commit | a6ee4632ce618e60909aa4310e33d60dcdfc1aec (patch) | |
| tree | 3880eaee928aa7950c9392286dbc7321b5784679 /tests | |
| parent | d729a7670782c3a002485bdd3ffefa8651b14d27 (diff) | |
| parent | 47e7c1356c1364e5e834ce37cd4a9ace5e2d838e (diff) | |
Merge pull request #5987 from Bond-009/ioob
PathExtensions: Fix index out of bounds in TryReplaceSubPath
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs index e5508243f..c5cc056f5 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs @@ -33,6 +33,7 @@ namespace Jellyfin.Server.Implementations.Tests.Library [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff", "/home/jeff/", "/home/jeff/myfile.mkv")] [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff/", "/home/jeff/", "/home/jeff/myfile.mkv")] [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff/", "/", "/myfile.mkv")] + [InlineData("/o", "/o", "/s", "/s")] // regression test for #5977 public void TryReplaceSubPath_ValidArgs_Correct(string path, string subPath, string newSubPath, string? expectedResult) { Assert.True(PathExtensions.TryReplaceSubPath(path, subPath, newSubPath, out var result)); |
