Hi there,
I wrote a test harness in C++ with reproc that test and compare the output my CLI program (test subject) to a reference file. And I didn't know why my test keep failing on Windows until I actually grab the debugger and it turns out that the string read by reproc::drain has the Windows-style endings of \r\n instead of just \n like in the reference file. Now, I could've just resolve this issue on my own but I think this use case of using reproc(++) to compare output of a CLI program with a file is really common, and I think that line ending normalization (converting all of them to \n) is going to be helpful. Do you want me to open a PR to edit reproc_read?
Hi there,
I wrote a test harness in C++ with reproc that test and compare the output my CLI program (test subject) to a reference file. And I didn't know why my test keep failing on Windows until I actually grab the debugger and it turns out that the string read by
reproc::drainhas the Windows-style endings of\r\ninstead of just\nlike in the reference file. Now, I could've just resolve this issue on my own but I think this use case of using reproc(++) to compare output of a CLI program with a file is really common, and I think that line ending normalization (converting all of them to \n) is going to be helpful. Do you want me to open a PR to editreproc_read?