I’m writing an integration test and want to know the best way to pipe to STDIN
.
The closest I’ve gotten is print(STDIN, "blah")
, but this still required me to press enter.
What’s the best way to accomplish this?
I know redirect_stdin()
exists, but the docs and googlable posts don’t really say much.