From b66c6b57149c81293dd95898c5ea37041575703a Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Mon, 22 Mar 2021 13:39:48 -0500 Subject: [PATCH] Fixed some parser unit tests around negative lookaheads --- API.Tests/ParserTest.cs | 4 ++-- API/Parser/Parser.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API.Tests/ParserTest.cs b/API.Tests/ParserTest.cs index 0190e6dc7..fb985a24a 100644 --- a/API.Tests/ParserTest.cs +++ b/API.Tests/ParserTest.cs @@ -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) diff --git a/API/Parser/Parser.cs b/API/Parser/Parser.cs index ec7cc8223..0a3466dbf 100644 --- a/API/Parser/Parser.cs +++ b/API/Parser/Parser.cs @@ -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)(?.*) (?\d+(?:.\d+|-\d+)?)(?: \(\d{4}\))?", + @"^(?!Vol)(?.*) (?\d+(?:.\d+|-\d+)?)(?: \(\d{4}\))?", RegexOptions.IgnoreCase | RegexOptions.Compiled), // Tower Of God S01 014 (CBT) (digital).cbz new Regex(