blob: e6b0409db73f756784cfef7879de8a35ce539d0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using Emby.Naming.Common;
using Emby.Naming.TV;
using Xunit;
namespace Jellyfin.Naming.Tests.TV
{
public class SeriesPathParserTest
{
private readonly NamingOptions _namingOptions = new NamingOptions();
[Theory]
[InlineData("The.Show.S01", "The.Show")]
[InlineData("/The.Show.S01", "The.Show")]
[InlineData("/some/place/The.Show.S01", "The.Show")]
[InlineData("/something/The.Show.S01", "The.Show")]
[InlineData("The Show Season 10", "The Show")]
[InlineData("The Show S01E01", "The Show")]
[InlineData("The Show S01E01 Episode", "The Show")]
[InlineData("/something/The Show/Season 1", "The Show")]
[InlineData("/something/The Show/S01", "The Show")]
public void SeriesPathParserParseTest(string path, string name)
{
var res = SeriesPathParser.Parse(_namingOptions, path);
Assert.Equal(name, res.SeriesName);
Assert.True(res.Success);
}
}
}
|