Special Marker Changes (#306)
* SP# is now a way to force the file to be a special rather than pushing it into a Specials folder. * Made it so if there is a Special (for any Parse call), volume and chapters will be ignored. * Fixed a unit test missing Theory and fixed a regex case
This commit is contained in:
parent
46b60405b1
commit
584348c6ad
5 changed files with 60 additions and 18 deletions
|
@ -145,6 +145,7 @@ namespace API.Tests.Parser
|
|||
[InlineData("X-Men v1 #201 (September 2007).cbz", "X-Men")]
|
||||
[InlineData("Kodoja #001 (March 2016)", "Kodoja")]
|
||||
[InlineData("Boku No Kokoro No Yabai Yatsu - Chapter 054 I Prayed At The Shrine (V0).cbz", "Boku No Kokoro No Yabai Yatsu")]
|
||||
[InlineData("Kiss x Sis - Ch.36 - A Cold Home Visit.cbz", "Kiss x Sis")]
|
||||
public void ParseSeriesTest(string filename, string expected)
|
||||
{
|
||||
Assert.Equal(expected, API.Parser.Parser.ParseSeries(filename));
|
||||
|
@ -242,8 +243,8 @@ namespace API.Tests.Parser
|
|||
[InlineData("Gifting The Wonderful World With Blessings! - 3 Side Stories [yuNS][Unknown]", true)]
|
||||
[InlineData("A Town Where You Live - Bonus Chapter.zip", true)]
|
||||
[InlineData("Yuki Merry - 4-Komga Anthology", false)]
|
||||
[InlineData("Beastars - SP01", true)]
|
||||
[InlineData("Beastars SP01", true)]
|
||||
[InlineData("Beastars - SP01", false)]
|
||||
[InlineData("Beastars SP01", false)]
|
||||
public void ParseMangaSpecialTest(string input, bool expected)
|
||||
{
|
||||
Assert.Equal(expected, !string.IsNullOrEmpty(API.Parser.Parser.ParseMangaSpecial(input)));
|
||||
|
|
|
@ -5,6 +5,16 @@ namespace API.Tests.Parser
|
|||
{
|
||||
public class ParserTests
|
||||
{
|
||||
|
||||
[Theory]
|
||||
[InlineData("Beastars - SP01", true)]
|
||||
[InlineData("Beastars SP01", true)]
|
||||
[InlineData("Beastars Special 01", false)]
|
||||
[InlineData("Beastars Extra 01", false)]
|
||||
public void HasSpecialTest(string input, bool expected)
|
||||
{
|
||||
Assert.Equal(expected, HasSpecialMarker(input));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("0001", "1")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue