mod support;
use support::tcode_command;
#[test]
fn config_help_advertises_keys_feature() {
let out = tcode_command()
.args(["config", "--help"])
.output()
.expect("spawn `config --help`");
assert!(
out.status.success(),
"`config --help` should exit 0; stderr:\n{}",
String::from_utf8_lossy(&out.stderr)
);
let stdout = String::from_utf8_lossy(&out.stdout);
assert!(
stdout.contains("keys"),
"`config --help` should advertise the `keys` feature; got:\n{stdout}"
);
}
#[test]
fn config_keys_list_runs_offline() {
let out = tcode_command()
.args(["config", "keys", "list"])
.output()
.expect("spawn `config keys list`");
assert!(
out.status.success(),
"`config keys list` should exit 0 offline; stderr:\n{}",
String::from_utf8_lossy(&out.stderr)
);
let stdout = String::from_utf8_lossy(&out.stdout);
assert!(
stdout.contains("Provider key status"),
"`config keys list` should print the status header; got:\n{stdout}"
);
}