-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
fix(tests): restrict 'cat' tests to unix environments. Fixes #776 #777
Conversation
Tests using the 'cat' command are specific to unix-like environments and fail on unsupported platforms.
Thank you for reporting this and for opening a PR. It would be great if we could test this behavior on Windows somehow. Maybe we can find a Windows replacement for |
Great idea! |
tests/integration_tests.rs
Outdated
.arg("--runs=1") | ||
.arg("--input=example_input_file.txt") | ||
.arg("--show-output") | ||
.arg("type example_input_file.txt") |
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.
This is not testing the right thing, I believe? The cat
test above on Linux makes sure that we can pipe input from example_input_file.txt
into the benchmarked command. But this looks to me like you ignore that and simply output the contents if example_input_file.txt
using type
.
Whoops! I missed that detail 😅 Although, found 2 alternatives that can handle pipe stdin on Windows,
|
Thanks for looking into this. I think this is an acceptable hack. We should add a link to that stackoverflow answer to explain what's going on though. |
Thank you for reviewing this. |
Thank you. I think we can use something like |
That makes sense! |
Thank you! |
(sharkdp#777) Tests using the 'cat' command are specific to unix-like environments and fail on unsupported platforms.
Tests using the
cat
command are specific to Unix-like environments and will fail on unsupported platforms.Restrict these tests to unix environments only.