Closed WojciechNagorski closed 4 months ago
@Rob-Hague Can I ask for a review?
@Rob-Hague Thanks! I haven't touched the other tests and I won't.
Btw, working on ShellStream makes me wish it derived from StreamReader rather than Stream... it would save a lot of repeated encoding work for the Expect methods (and just make more sense in general). But perhaps not worth the break.
I believe that ShellStream still has it's place, however perhaps a new ShellStreamReader could be added that would consume the a ShellStream and we could slowly migrate functionality between the two classes.
It could even be done in two steps. First by adding the new methods into ShellStreamReader, and then later deprecating them on ShellStream.
This issue has been fixed in the 2024.0.0 version.
There are three implementation of Expect method:
Two of them return string ends with the expected expression. Only the first one works differently. In this PR I fixed this problem.
Moreover, the _incoming array contains bytes and regex works on UTF8 encoding, so we should count how many bytes we should remove from the incoming array.
Continuation of #1313 Added test failures for #1207 (does not fix performance issue)