prefer numbers without anything appended when parsing chapter numbers

This commit is contained in:
Robin Appelman
2016-02-09 20:43:10 +01:00
parent 5977e9f47f
commit fa4a8204a4
2 changed files with 33 additions and 9 deletions

View File

@@ -141,4 +141,11 @@ public class ChapterRecognitionTest {
ChapterRecognition.parseChapterNumber(c, randomManga);
assertThat(c.chapter_number).isEqualTo(11f);
}
@Test
public void testWithNumberInChapterTitle() {
Chapter c = createChapter("Ansatsu Kyoushitsu 099 Present Time - 2nd Hour");
ChapterRecognition.parseChapterNumber(c, randomManga);
assertThat(c.chapter_number).isEqualTo(99f);
}
}