fn help(args: &[&str]) -> String {
let bin = env!("CARGO_BIN_EXE_btctax");
let out = std::process::Command::new(bin)
.args(args)
.output()
.expect("btctax binary must execute");
String::from_utf8_lossy(&out.stdout).into_owned() + &String::from_utf8_lossy(&out.stderr)
}
#[test]
fn classify_inbound_income_help_has_fmv_units_and_kind_values() {
let h = help(&["reconcile", "classify-inbound-income", "--help"]);
assert!(
h.contains("USD dollars, NOT sats"),
"--fmv must disambiguate the unit:\n{h}"
);
assert!(
h.contains("mining") && h.contains("staking"),
"--kind must list its valid values:\n{h}"
);
assert!(
h.contains("FMV missing"),
"--fmv help must state the real no-fmv behavior (a Hard FMV-missing blocker):\n{h}"
);
assert!(
!h.contains("bundled daily close for the receipt date is used"),
"the false daily-close fallback claim must be gone:\n{h}"
);
assert!(
h.contains("reconcile void") && h.contains("first-wins"),
"--fmv help remedy must be `reconcile void` then re-classify (first-wins):\n{h}"
);
}
#[test]
fn set_fmv_help_has_fmv_units() {
let h = help(&["reconcile", "set-fmv", "--help"]);
assert!(
h.contains("USD dollars, NOT sats"),
"--fmv must disambiguate the unit:\n{h}"
);
}