xtask/tests/siblings_verb.rs
//! **`cargo xtask siblings` still exists, succeeds and does nothing else.**
//!
//! monetize's `cargo xtask build-guests` runs it in this sibling before it builds
//! `crates/gunnar-monetize-guest` with `cargo build --locked` (2026-10-25). Until G-B7 it switched
//! the estate's sibling patches on (`.cargo/siblings.toml`); since G-B7 the guest's own manifest
//! carries the patches its lock takes, so there is nothing to switch, but the verb stays so that
//! caller keeps working.
use std::process::Command;
const EXE: &str = env!("CARGO_BIN_EXE_xtask");
#[test]
fn the_siblings_verb_exists_and_succeeds() {
let out = Command::new(EXE)
.arg("siblings")
.output()
.expect("run xtask siblings");
let err = String::from_utf8_lossy(&out.stderr);
assert!(
out.status.success(),
"`cargo xtask siblings` must succeed: {err}"
);
assert!(
!err.to_lowercase().contains("unknown"),
"`siblings` is a known verb: {err}"
);
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.expect("xtask has a parent");
assert!(
!root.join(".cargo/siblings.toml").exists()
|| std::fs::read_to_string(root.join(".cargo/config.toml"))
.map(|c| !c.contains("siblings.toml\""))
.unwrap_or(true),
"the verb wrote a sibling table something includes"
);
}