fallback to parsing parts to handle arc numbers

This commit is contained in:
Robin Appelman
2016-02-09 21:19:34 +01:00
parent 1611a274b9
commit bc1ddd4379
2 changed files with 20 additions and 0 deletions

View File

@@ -158,4 +158,11 @@ public class ChapterRecognitionTest {
ChapterRecognition.parseChapterNumber(c, randomManga);
assertThat(c.chapter_number).isEqualTo(19.2f);
}
@Test
public void testChapterWithArcNumber() {
Chapter c = createChapter("Manga title 123 - Vol 016 Arc title 002");
ChapterRecognition.parseChapterNumber(c, randomManga);
assertThat(c.chapter_number).isEqualTo(123f);
}
}