forked from 1b-agent/fieldcraft-upstream
cli: fieldcraft-cli --version
The release packaging runs it to check each build (#72). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
8caa0d15cb
commit
8172af67e7
2 files changed
+18
No files matched your search
@@ -0,0 +1,12 @@
|
||||
//! `fieldcraft-cli --version`, which the release packaging runs to check each build.
|
||||
|
||||
use std::process::Command;
|
||||
|
||||
#[test]
|
||||
fn version_prints_the_workspace_version() {
|
||||
for flag in ["--version", "-V"] {
|
||||
let out = Command::new(env!("CARGO_BIN_EXE_fieldcraft-cli")).arg(flag).output().unwrap();
|
||||
assert!(out.status.success(), "{flag}: {out:?}");
|
||||
assert_eq!(String::from_utf8_lossy(&out.stdout).trim(), format!("fieldcraft-cli {}", env!("CARGO_PKG_VERSION")));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user