revised modal to demonstrate that `'s` at end of name is only retained when its the last two chars. otherwise its cleaned

This commit is contained in:
Stevie Robinson 2023-07-20 20:20:50 +02:00
parent 14065419e7
commit 8085ba1b2f
4 changed files with 7 additions and 2 deletions

View File

@ -44,9 +44,9 @@ const fileNameTokens = [
const seriesTokens = [
{ token: '{Series Title}', example: 'The Series Title\'s!' },
{ token: '{Series CleanTitle}', example: 'The Series Titles!' },
{ token: '{Series CleanTitle}', example: 'The Series Title\'s!' },
{ token: '{Series CleanTitleYear}', example: 'The Series Titles! 2010' },
{ token: '{Series CleanTitleWithoutYear}', example: 'The Series Titles!' },
{ token: '{Series CleanTitleWithoutYear}', example: 'The Series Title\'s!' },
{ token: '{Series TitleThe}', example: 'Series Title\'s!, The' },
{ token: '{Series TitleTheYear}', example: 'Series Title\'s!, The (2010)' },
{ token: '{Series TitleTheWithoutYear}', example: 'Series Title\'s!, The' },

View File

@ -70,6 +70,8 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
[TestCase("[a] title", "a title")]
[TestCase("backslash \\ backlash", "backslash backlash")]
[TestCase("I'm the Boss", "Im the Boss")]
[TestCase("The Title's", "The Title's")]
[TestCase("I'm after I'm", "Im after I'm")]
// [TestCase("", "")]
public void should_get_expected_title_back(string title, string expected)

View File

@ -54,6 +54,8 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
[TestCase("The Mist", 2018, "The Mist")]
[TestCase("The Rat Pack (A&E)", 1999, "The Rat Pack AandE")]
[TestCase("The Climax: I (Almost) Got Away With It (2016)", 2016, "The Climax I Almost Got Away With It")]
[TestCase("The Series Title's (2016)", 2016, "The Series Titles")]
[TestCase("The Series Title's", 2016, "The Series Title's")]
public void should_get_expected_title_back(string title, int year, string expected)
{
_series.Title = title;

View File

@ -54,6 +54,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
[TestCase("The Mist", 2018, "The Mist 2018")]
[TestCase("The Rat Pack (A&E)", 1999, "The Rat Pack AandE 1999")]
[TestCase("The Climax: I (Almost) Got Away With It (2016)", 2016, "The Climax I Almost Got Away With It 2016")]
[TestCase("The Series Title's", 2016, "The Series Titles 2016")]
public void should_get_expected_title_back(string title, int year, string expected)
{
_series.Title = title;