trycmd
trycmd copied to clipboard
Snapshot testing for a herd of CLI tests
I'd like to be able to show examples in my documentation that use standard input. My usual way to document this is something like: ```console $ echo "some simple input"...
I'm testing a tool that requires for example creating a git repository and cd'ing into it, something like: ``` mkdir foo cd foo git init . my-cmd ... ``` It...
I use clap, and I put examples in the documentation comments for my commands/subcommands like: ```rust enum Commands { /// Counts from START to STOP. /// /// $ mycli counter...
I was wondering if there was any functionality that would allow using command output to bind a variable, such that it could be used to test a subsequent command? For...
In trying to set up trycmd I had this md file: ```trycmd $ cargo mutants --help ``` This gives a result of `ignored`. With `--nocapture` I could find out: ```...
Windows has the extended path length syntax to work around legacy file path restrictions. These paths start with the string `\\?\` followed by a normal path; more details can be...
I have a program that produces a number of lines of output that do not need to be in any particular order. I suppose I could add an option to...
I was surprised to learn that `trycmd` does not check that all files and directories in `.out` dir are present and the same as the generated output, but only that...
Currently, if a file has no tests, it says `Testing foo ... ignored`, but it should instead say `Testing README.md ... no tests`. Or maybe it should fail? This is...
That is, it should insert (or update) `? ERROR_CODE` in the test.