trycmd
trycmd copied to clipboard
Snapshot testing for a herd of CLI tests
Go has `txtar` for describing multiple files in a single string. At least at one point, rust analyzer had [its own thing](https://github.com/rust-lang/rust-analyzer/blob/0f7961d5570f17d6c2098ab11d2a3bcbbfb84ff6/crates/ra_hir_ty/src/tests/traits.rs#L13-L34). Might be nice to do this both for...
The following code: ```rs snapbox::assert_eq("foo", "bar"); ``` results in: ``` --- Expected +++ Actual 1 - foo∅ 1 + bar∅ ``` which funnily enough is rather unexpected. When writing comparisons...
[`std::assert_eq`](https://doc.rust-lang.org/std/macro.assert_eq.html) supports providing a custom panic message in a third argument (optionally followed by further parameters for the message arguments). `pretty_assertions` and `similar-asserts` both provide `assert_eq!` macros that are compatible....
I'd like to be able to create multiline files from within the `trycmd` blocks to serve as test fixtures. Is it possible? I'm thinking something like this (pseudo code): ```console...
In https://github.com/Electron100/butane/commit/c5761ccd9b1e5716a867e746b95d59a7e4f8ddd7 I attempted to set up trycmd on some existing .md files. I only got "ignored", so I added "debug" feature (not mentioned in this projects README.md), and still...
The sequence in https://github.com/Electron100/butane/commit/c5761ccd9b1e5716a867e746b95d59a7e4f8ddd7#diff-b70d3a47c15879d308451b54821682f1d63518db732881b434c4110d9ca7a767 assumes that the user is in the directory containing the .md file. I think that is a reasonable default for trycmd. I don't see any `set_current_dir`...
(Filing this issue in response to discussion on #214.) I frequently find myself brushing up against limitations in the file formats that `trycmd` currently supports. (I am one of the...
(Filing this issue in response to discussion on #214.) As I made the case for in #214, there is value in leveraging trycmd's internal data structures (namely `TryCmd` and everything...
With 0.5.11 and 0.6.0 (#311), we've made a lot of changes in flexibility for data asserts. These weren't applied to directories. For API ideas, see - [ ] #301 -...
### Steps ``` git clone https://gitlab.torproject.org/tpo/core/arti.git cd arti git checkout 5e2d5532d002c9df9a4cf6d83cdbe7d6125bc4be COLUMNS=100 cargo test --locked --offline -p arti --all-features -- cli_tests COLUMNS=1000 cargo test --locked --offline -p arti --all-features --...