in reply to Outputting input prompt with prove

That's because it's not your process that is buffering it. It's prove. I suspect it is reading line-by-line to be able to intersperse its own output without having stuff appear in funny places. But that means that because your "Enter" line doesn't have a line ending, prove thinks there is still more coming, and won't know you're done until it hits the \n, as there may be an ok(...) in there somewhere, and it needs to print that out properly should it happen.

That being said, I'm not sure why anything you expect to run under prove would be printing out partial lines or reading from STDIN. Both of those seem to be odd things to put in tests.

Replies are listed 'Best First'.
Re^2: Outputting input prompt with prove
by nysus (Parson) on Aug 05, 2019 at 05:37 UTC

    Iím not sure how I could avoid getting input from the user. Is there a way to inject input automatically?

      Did you write the test program? Then rewrite it so it doesn't need interactive input.

      If you didn't write the test program and cannot change it, don't use prove with it or learn that you need to type the input blindly.

      Maybe you can write a wrapper for test that writes the input you want to it and passes its output through, maybe using IPC::Run3.