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

Run cargo build and test built binary to ensure it works #246

Merged
merged 3 commits into from
Dec 27, 2022

Conversation

tonowak
Copy link
Collaborator

@tonowak tonowak commented Dec 23, 2022

Closes #235

@tonowak tonowak removed the request for review from epage December 23, 2022 13:22
Copy link
Collaborator

@epage epage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo if you have this complex of a step, it should probably broken out.

What I'd recommend doing is writing this as a test. Cargo builds binaries before running tests, so you can write end-to-end cli tests in Rust. I used to write mine with assert_cmd/assert_fs but have switched to snapbox

@tonowak
Copy link
Collaborator Author

tonowak commented Dec 23, 2022

Thanks for the information! I wrote the test using assert_cmd.

Cargo.toml Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@obi1kenobi obi1kenobi merged commit fc5aa9e into obi1kenobi:main Dec 27, 2022
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.

Run cargo build and test built binary to ensure it works
3 participants