Skip to content

Commit

Permalink
Tests for parsing Polish language
Browse files Browse the repository at this point in the history
  • Loading branch information
tenshiak authored and Qstick committed Dec 31, 2020
1 parent 4c88096 commit 61b76f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/NzbDrone.Core.Test/ParserTests/LanguageParserFixture.cs
Expand Up @@ -158,6 +158,14 @@ public void should_parse_language_brazilian_portuguese(string postTitle)
}

[TestCase("Pulp.Fiction.1994.Polish.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.PL.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.PLDUB.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.DUBPL.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.PL-DUB.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.DUB-PL.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.PLLEK.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.LEKPL.1080p.XviD-LOL")]
[TestCase("Pulp.Fiction.1994.PL-LEK.1080p.XviD-LOL")]
public void should_parse_language_polish(string postTitle)
{
var result = Parser.Parser.ParseMovieTitle(postTitle, true);
Expand Down
4 changes: 2 additions & 2 deletions src/NzbDrone.Core/Parser/LanguageParser.cs
Expand Up @@ -154,7 +154,7 @@ public static List<Language> ParseLanguages(string title)
{
languages.Add(Language.Czech);
}

if (caseSensitiveMatch.Groups["polish"].Captures.Cast<Capture>().Any())
{
languages.Add(Language.Polish);
Expand Down Expand Up @@ -228,7 +228,7 @@ public static List<Language> ParseLanguages(string title)
{
languages.Add(Language.Polish);
}

if (match.Groups["chinese"].Success)
{
languages.Add(Language.Chinese);
Expand Down

0 comments on commit 61b76f8

Please sign in to comment.