mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-06 14:55:19 -04:00
Fixed some parser unit tests around negative lookaheads
This commit is contained in:
@@ -178,9 +178,9 @@ namespace API.Tests
|
||||
|
||||
[Theory]
|
||||
[InlineData("test.cbz", true)]
|
||||
[InlineData("test.cbr", false)]
|
||||
[InlineData("test.cbr", true)]
|
||||
[InlineData("test.zip", true)]
|
||||
[InlineData("test.rar", false)]
|
||||
[InlineData("test.rar", true)]
|
||||
[InlineData("test.rar.!qb", false)]
|
||||
[InlineData("[shf-ma-khs-aqs]negi_pa_vol15007.jpg", false)]
|
||||
public void IsArchiveTest(string input, bool expected)
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace API.Parser
|
||||
|
||||
// Hinowa ga CRUSH! 018 (2019) (Digital) (LuCaZ).cbz, Hinowa ga CRUSH! 018.5 (2019) (Digital) (LuCaZ).cbz
|
||||
new Regex(
|
||||
@"^(?!Vol)(?<Series>.*) (?<Chapter>\d+(?:.\d+|-\d+)?)(?: \(\d{4}\))?",
|
||||
@"^(?!Vol)(?<Series>.*) (?<!vol\. )(?<Chapter>\d+(?:.\d+|-\d+)?)(?: \(\d{4}\))?",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled),
|
||||
// Tower Of God S01 014 (CBT) (digital).cbz
|
||||
new Regex(
|
||||
|
||||
Reference in New Issue
Block a user