mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
Change ReadOnlySpan to string following PR 6383 (#6734)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using Emby.Naming.Common;
|
||||
using Emby.Naming.Video;
|
||||
using Xunit;
|
||||
@@ -32,9 +31,8 @@ namespace Jellyfin.Naming.Tests.Video
|
||||
// FIXME: [InlineData("After The Sunset - [0004].mkv", "After The Sunset")]
|
||||
public void CleanStringTest_NeedsCleaning_Success(string input, string expectedName)
|
||||
{
|
||||
Assert.True(VideoResolver.TryCleanString(input, _namingOptions, out ReadOnlySpan<char> newName));
|
||||
// TODO: compare spans when XUnit supports it
|
||||
Assert.Equal(expectedName, newName.ToString());
|
||||
Assert.True(VideoResolver.TryCleanString(input, _namingOptions, out var newName));
|
||||
Assert.Equal(expectedName, newName);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -47,8 +45,8 @@ namespace Jellyfin.Naming.Tests.Video
|
||||
[InlineData("Run lola run (lola rennt) (2009).mp4")]
|
||||
public void CleanStringTest_DoesntNeedCleaning_False(string? input)
|
||||
{
|
||||
Assert.False(VideoResolver.TryCleanString(input, _namingOptions, out ReadOnlySpan<char> newName));
|
||||
Assert.True(newName.IsEmpty);
|
||||
Assert.False(VideoResolver.TryCleanString(input, _namingOptions, out var newName));
|
||||
Assert.True(string.IsNullOrEmpty(newName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user