hack4chang commented on code in PR #13419: URL: https://github.com/apache/lucene/pull/13419#discussion_r1631543661
########## lucene/core/src/test/org/apache/lucene/analysis/TestWordlistLoader.java: ########## @@ -77,4 +82,17 @@ public void testSnowballListLoading() throws IOException { assertTrue(wordset.contains("six")); assertTrue(wordset.contains("seven")); } + + public void testGetLines() throws IOException { + String s = "One \n#Comment \n \n Two \n Three \n"; + Charset charset = StandardCharsets.UTF_8; + byte[] sByteArr = s.getBytes(charset); + InputStream sInputStream = new ByteArrayInputStream(sByteArr); + List<String> lines = WordlistLoader.getLines(sInputStream, charset); + assertEquals(3, lines.size()); + assertFalse(lines.contains("#Comment")); Review Comment: Ah, got it. Yeah you're right. I'll add the length assertion back. Thank you for the comment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org