Skip to content

Line endings on Windows #122

Description

@msqr1

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions