feat(qbzd): scaffold slint-free qbzd crate with clap verb tree and CI gate

IV6 build peak: 795 MB max RSS (summed across the cargo-capped build's
process tree via /proc VmRSS polling; /usr/bin/time -v is not installed
on this box). aws-lc-rs in graph: 0 (single rustls provider: ring
v0.17.14 throughout).

cc
This commit is contained in:
vicrodh committed 2026-07-14 12:53:09 -06:00
1 parent 90d9d1c66a
commit 02c2dba68d
6 files changed
+263

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
use std::process::Command;
#[test]
fn bare_qbzd_prints_help_and_exits_2() {
// 01-architecture.md §1.1: a typo'd verb must never leave a daemon running.
let out = Command::new(env!("CARGO_BIN_EXE_qbzd")).output().unwrap();
assert_eq!(out.status.code(), Some(2));
let text = String::from_utf8_lossy(&out.stdout) + String::from_utf8_lossy(&out.stderr);
assert!(text.contains("Usage"), "help text missing: {text}");
}
#[test]
fn version_answers_locally() {
// 02-cli-and-api.md §2.2: `qbzd version` needs no daemon, no network.
let out = Command::new(env!("CARGO_BIN_EXE_qbzd")).arg("version").output().unwrap();
assert_eq!(out.status.code(), Some(0));
assert!(String::from_utf8_lossy(&out.stdout).contains("api v1"));
}