removed empty line

added test case
This commit is contained in:
Carlos Escobedo 2018-01-25 06:44:48 -05:00
parent 4aba3b4c37
commit 7d64fee22c
2 changed files with 11 additions and 1 deletions

View File

@ -37,7 +37,6 @@ object ChapterRecognition {
*/
private val unwantedWhiteSpace = Regex("""(\s)(extra|special|omake)""")
fun parseChapterNumber(chapter: SChapter, manga: SManga) {
// If chapter number is known return.
if (chapter.chapter_number == -2f || chapter.chapter_number > -1f)

View File

@ -58,6 +58,17 @@ class ChapterRecognitionTest {
assertThat(chapter.chapter_number).isEqualTo(4f)
}
/**
* Ch. xx base case but space after period
*/
@Test fun ChCaseBase2() {
createManga("Mokushiroku Alice")
createChapter("Mokushiroku Alice Vol. 1 Ch. 4: Misrepresentation")
ChapterRecognition.parseChapterNumber(chapter, manga)
assertThat(chapter.chapter_number).isEqualTo(4f)
}
/**
* Ch.xx.x base case
*/