go-internal icon indicating copy to clipboard operation
go-internal copied to clipboard

Allow reading from stdin in perpetuity

Open mpvl opened this issue 5 years ago • 2 comments

It can be useful to test how programs behave reading from stdin if this is not terminated. Currently this doesn't seem possible. Either stdin sends EOF immediately or it must be set with finite content.

mpvl avatar Sep 30 '20 15:09 mpvl

I would also find this useful for testing edge cases. We could add stdin - to mean that stdin is left open forever but never provies any bytes.

mvdan avatar Sep 30 '20 15:09 mvdan

Can you provide an example testscript where this might come in useful? I'm finding it hard to understand how this would work in practice.

rogpeppe avatar Dec 10 '20 15:12 rogpeppe