-
Notifications
You must be signed in to change notification settings - Fork 312
Start adding tests for -h and --help output #2323
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
Start adding tests for -h and --help output #2323
Conversation
|
Poking through clap sources, setting the |
|
I think it's already a pipe? https://github.com/bytecodealliance/wasm-tools/blob/main/tests/cli.rs#L155 I added |
Add tests for the -h and --help output for the `parse`, `print`, and `validate` commands.
d0392ba to
8937cdc
Compare
|
Ah the old nemesis of Windows... Looks like the issue is: Maybe a hammer like this could work where the tests just replace |
|
Green now :) |
| let mut output = String::from_utf8_lossy(output) | ||
| .replace(tempdir, "%tmpdir") | ||
| .replace("\\", "/") | ||
| .replace("wasm-tools.exe", "wasm-tools") |
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.
Much better than my idea!
Add tests for the -h and --help output for the
parse,print, andvalidatecommands.