//! Binary smoke: `sunset` and `blade-runner` color flags.

use std::process::Command;

fn exe() -> &'static str {
    env!("CARGO_BIN_EXE_storageshower")
}

fn output(args: &[&str]) -> std::process::Output {
    Command::new(exe())
        .args(args)
        .output()
        .unwrap_or_else(|e| panic!("spawn {}: {e}", exe()))
}

#[test]
fn sunset_list_colors() {
    let o = output(&["--color", "sunset", "--list-colors"]);
    assert!(
        o.status.success(),
        "stderr={}",
        String::from_utf8_lossy(&o.stderr)
    );
}

#[test]
fn blade_runner_no_virtual_version() {
    let o = output(&["--color", "blade-runner", "--no-virtual", "-V"]);
    assert!(o.status.success());
}
