assert_cmd icon indicating copy to clipboard operation
assert_cmd copied to clipboard

Assert process::Command - Easy command initialization and assertions

Results 28 assert_cmd issues
Sort by recently updated
recently updated
newest added

Would be nice to have a new method `dump()`: ``` assert_cmd::Command::cargo_bin("foo") .unwrap() .current_dir(tmp.path()) .arg("--verbose") .arg("bar") .assert() .dump() // here! .success(); ``` It should print the entire `stdout` and `stderr` to...

enhancement

It would be nice to mention that when running tests in `cross`, one needs to prepend their command with the value contained in `CARGO_TARGET_*_RUNNER` i.e `qemu-aarch64 xh` ```rust fn find_runner()...

enhancement

@mssun > Another issue about testing CLIs is to correctly calculate code coverage. If using std::process::Command to fork and execute a CLI, all existing code coverage tools (tarpaulin, gcov, kcov,...

bug

Using crate `atty`: ```rust let stdout_is_a_tty: bool = atty::is(Stream::Stdout); if stdout_is_a_tty { "" } else { "" } ``` When I run tests, `stdout_is_a_tty` is always false, hence I can't...

enhancement
question

This is partially my failure in #103. As we concentrated in that PR on binary data (which is my other use case), but not on default text output. So instead...

enhancement

Not a pressing issue at all, just a random thing I wanted recently for nicer test debugging.

enhancement

Hi! Today, I've written a bunch of tests for https://github.com/ferrous-systems/cargo-review-deps/blob/3ba1523f3b2c2cfe807bc76f42bf972d0efdc113/tests/test_cli.rs. Initially, I've started with `assert_cmd`, then I've switched to `assert_cli` and now I have "write my own minimal testing harness...

As food for thoughts, here's how I'm using `assert_cmd`. The guiding idea is that I build a struct describing programs to run/delay/kill, a set of input files, and a set...

enhancement