fix(tests): restrict 'cat' tests to unix environments. Fixes #776#777
fix(tests): restrict 'cat' tests to unix environments. Fixes #776#777sharkdp merged 7 commits intosharkdp:masterfrom
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.
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
catcommand are specific to Unix-like environments and will fail on unsupported platforms.Restrict these tests to unix environments only.