use std::process::Command;
#[test]
fn test_cli_list_command() {
let output = Command::new("cargo")
.args(&["run", "--", "list"])
.output()
.expect("Failed to run command");
assert!(output.status.success());
}
#[test]
fn test_cli_unknown_command() {
let output = Command::new("cargo")
.args(&["run", "--", "invalid"])
.output()
.expect("Failed to run command");
assert!(!output.status.success() || output.stderr.len() > 0 || output.stdout.len() > 0);
}
#[test]
fn test_cli_no_arguments() {
let output = Command::new("cargo")
.args(&["run"])
.output()
.expect("Failed to run command");
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(stdout.contains("Usage") || stdout.contains("rbam"));
}