Closed spacecowboy closed 8 years ago
Trying to upgrade from jline2 and ran into this. Here's a test to reproduce:
@Test public void emptyStringGivesEOF() throws Exception { String inputString = ""; InputStream inputStream = new ByteArrayInputStream(inputString.getBytes()); LineReaderBuilder builder = LineReaderBuilder.builder() .terminal(TerminalBuilder.builder() .streams(inputStream, System.out) .build()); LineReader reader = builder.build(); // this gets trapped in an infinite loop assertNull(reader.readLine()); }
I'll fix the problem, but you should expect an EndOfFileException to be thrown instead of a null return.
Trying to upgrade from jline2 and ran into this. Here's a test to reproduce: