test-better-runner 0.2.1

Optional pretty test runner (`cargo-test-better`) for the test-better testing library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! `cargo-test-better`: optional pretty runner binary.
//!
//! A thin shell over [`test_better_runner::run`]: it wraps `cargo test`,
//! forwards every argument, and propagates the exit code so that
//! `cargo test-better` and `cargo test` agree on success and failure.

use std::process::ExitCode;

fn main() -> ExitCode {
    match test_better_runner::run(std::env::args_os().skip(1)) {
        Ok(code) => ExitCode::from(u8::try_from(code).unwrap_or(101)),
        Err(error) => {
            eprintln!("cargo-test-better: could not run `cargo test`: {error}");
            ExitCode::from(101)
        }
    }
}