Skip to content
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 for cargo.exe check command #11022

Merged

Conversation

gaetschwartz
Copy link
Contributor

This pull request fixes the tests for the cargo.exe check command. The tests were failing due cargo check -h sometimes reporting cargo.exe as the binary and thus not containing cargo check in the output.

The fix involves using the Command module from the std::process library to run the command and comparing its output to the expected output. No changes were made to the codebase itself.

@amtoine
Copy link
Member

amtoine commented Nov 10, 2023

@gaetschwartz
where did this fail?

@gaetschwartz
Copy link
Contributor Author

On my local windows machine, when I run cargo check -h the binary name is cargo.exe check in the help displayed by cargo, making the tests fail. Not sure why it reports cargo.exe on mine and not on the CI.

@sholderbach
Copy link
Member

Good solution! Thanks.

@sholderbach sholderbach merged commit 588a078 into nushell:main Nov 10, 2023
19 checks passed
gaetschwartz added a commit to gaetschwartz/nushell that referenced this pull request Nov 11, 2023
This pull request fixes the tests for the `cargo.exe check` command. The
tests were failing due `cargo check -h` sometimes reporting `cargo.exe`
as the binary and thus not containing `cargo check` in the output.

The fix involves using the `Command` module from the `std::process`
library to run the command and comparing its output to the expected
output. No changes were made to the codebase itself.
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
This pull request fixes the tests for the `cargo.exe check` command. The
tests were failing due `cargo check -h` sometimes reporting `cargo.exe`
as the binary and thus not containing `cargo check` in the output.

The fix involves using the `Command` module from the `std::process`
library to run the command and comparing its output to the expected
output. No changes were made to the codebase itself.
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this pull request Feb 20, 2024
This pull request fixes the tests for the `cargo.exe check` command. The
tests were failing due `cargo check -h` sometimes reporting `cargo.exe`
as the binary and thus not containing `cargo check` in the output.

The fix involves using the `Command` module from the `std::process`
library to run the command and comparing its output to the expected
output. No changes were made to the codebase itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants