use crate::define_tool;
define_tool!(NETBIRD, {
command: "netbird",
macos: { brew: "netbirdio/tap/netbird" },
linux: { brew: "netbirdio/tap/netbird" },
windows: { winget: "Netbird.Netbird" },
category: "networking",
});
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn netbird_registration_shape() {
assert_eq!(NETBIRD.command, "netbird");
let mac = NETBIRD.macos.expect("must support macOS");
assert_eq!(mac.brew, Some("netbirdio/tap/netbird"));
let lin = NETBIRD.linux.expect("must support Linux");
assert_eq!(lin.brew, Some("netbirdio/tap/netbird"));
let win = NETBIRD.windows.expect("must support Windows");
assert_eq!(win.winget, Some("Netbird.Netbird"));
}
#[test]
fn netbird_brew_form_triggers_auto_tap() {
for spec in [
NETBIRD.macos.unwrap().brew.unwrap(),
NETBIRD.linux.unwrap().brew.unwrap(),
] {
assert_eq!(
spec.matches('/').count(),
2,
"brew spec must be org/tap/formula for auto-tap to fire"
);
}
}
}