-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: test multi-call logic #6198
Conversation
Thankfully, this revealed no bugs. Let's prevent regressions!
8a3bf3c
to
de37baa
Compare
Changes since last push:
|
GNU testsuite comparison:
|
|
||
let scenario = TestScenario::new("invalid_name"); | ||
symlink_file(scenario.bin_path, scenario.fixtures.plus("invalid_name")).unwrap(); | ||
let child = Command::new(scenario.fixtures.plus("invalid_name")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to adapt the test framework to support this so that we can write this test witht it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, sure, it is possible to do so, but I don't see the benefit?
The tests "unrecognized name" and "non-UTF-8 name" are likely going to be the only use cases for this. Perhaps one more edge case that I overlooked, but I really don't see the advantage to make this more generally available.
|
I noticed that
src/bin/coreutils.rs
had abysmal coverage. Turns out, we don't have any tests for most features of our "multi-call binary" logic!This PR fixes that by adding a few tests, namely:
Thankfully, this revealed no bugs. Let's prevent regressions!
EDIT: From 19% to 68%: https://app.codecov.io/gh/uutils/coreutils/blob/BenWiederhake%2Fcoreutils-rs%3Adev-better-test-coverage/src%2Fbin%2Fcoreutils.rs