use std::process::{Command, Stdio};
fn run_cargo_trim(args: &[&str]) {
let status = Command::new("cargo")
.stdout(Stdio::null())
.arg("run")
.arg("--")
.arg("trim")
.args(args)
.status()
.unwrap();
assert!(status.success());
}
#[test]
fn test_help() {
run_cargo_trim(&["help"]);
}
#[test]
fn test_list_help() {
run_cargo_trim(&["help", "list"]);
}
#[test]
fn test_config_help() {
run_cargo_trim(&["help", "config"]);
}
#[test]
fn test_git_help() {
run_cargo_trim(&["help", "git"]);
}
#[test]
fn test_registry_help() {
run_cargo_trim(&["help", "registry"]);
}
#[test]
fn test_set_help() {
run_cargo_trim(&["help", "set"]);
}
#[test]
fn test_unset_help() {
run_cargo_trim(&["help", "unset"]);
}