stefanvodita commented on code in PR #13419:
URL: https://github.com/apache/lucene/pull/13419#discussion_r1631490716


##########
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:
   Maybe I wasn't clear, but I only referred to the assertion about an item 
missing from the list, while the new commit also removed the assertion about 
the length of the list. If we assert length 3 and then assert on 3 elements of 
the list, that fully characterises the list, right?



-- 
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

Reply via email to