Closed mattirn closed 1 month ago
Can we reuse the provided example to create a unit test for that ?
Yes, that can be done.... though I'm not able to create InputStream
with enter-key chars. I have tried to create it as
InputStream inputStream = new ByteArrayInputStream("\r\r\r\r\r".getBytes());
but it does not work correctly. Currently I'm working on Windows if that does matter.
Can we reuse the provided example to create a unit test for that ?
Yes, that can be done.... though I'm not able to create
InputStream
with enter-key chars. I have tried to create it asInputStream inputStream = new ByteArrayInputStream("\r\r\r\r\r".getBytes());
but it does not work correctly. Currently I'm working on Windows if that does matter.
That's because the InputFlag.ICRNL
is set by default in the LineDisciplinedTerminal, which makes me think that the console ui KeyMap
should support both \r
and \n
to validate input.
Can we reuse the provided example to create a unit test for that ?