coreutils
coreutils copied to clipboard
nohup: write unit tests to improve coverage
We almost don't have tests for nohup. We should have more: https://codecov.io/gh/uutils/coreutils/tree/master/src/uu/nohup/src
Should be added here: https://github.com/uutils/coreutils/blob/master/tests/by-util/test_nohup.rs
The implementation gets exercised only if stdin, stdout and stderr are connected with interactive terminals. I can't think of a straightforward way to do this from tests.
I'm thinking of using pty crate to fork a child with pseudo-terminal(pty) and invoke the implementation. I haven't tried this but it looks doable.
@sylvestre Let me know if this approach is fine or if there is a better approach.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is the oldest beginner friendly issue. I would like to tackle it. Would this be ok? This is my first time on opensource, so I would appreciate some tips along the process, if you guys don't mind. I'll start looking at the code today to understand a little bit better.
sure, please give it a try :)